author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 16 Jun 2010 21:12:05 +0100 | |
branch | jv |
changeset 17767 | a4a32df3aa5e |
parent 17761 | b0e5971141bc |
child 17772 | 6e0b3c06c364 |
permissions | -rw-r--r-- |
8148 | 1 |
" |
2 |
COPYRIGHT (c) 2004 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
8079 | 12 |
"{ Package: 'stx:libbasic' }" |
13 |
||
14 |
"{ NameSpace: CharacterEncoderImplementations }" |
|
15 |
||
8134 | 16 |
CharacterEncoder subclass:#TwoByteEncoder |
8079 | 17 |
instanceVariableNames:'' |
18 |
classVariableNames:'' |
|
19 |
poolDictionaries:'' |
|
20 |
category:'Collections-Text-Encodings' |
|
21 |
! |
|
22 |
||
8148 | 23 |
!TwoByteEncoder class methodsFor:'documentation'! |
24 |
||
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 2004 by eXept Software AG |
|
28 |
All Rights Reserved |
|
29 |
||
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! ! |
|
8079 | 38 |
|
39 |
!TwoByteEncoder class methodsFor:'queries'! |
|
40 |
||
41 |
maxCode |
|
42 |
^ 16rFFFF |
|
43 |
! |
|
44 |
||
45 |
minCode |
|
46 |
^ 0 |
|
47 |
! ! |
|
48 |
||
49 |
!TwoByteEncoder methodsFor:'private'! |
|
50 |
||
51 |
newString:size |
|
52 |
^ TwoByteString uninitializedNew:size |
|
53 |
! ! |
|
54 |
||
17732
a1892eeca6c0
trunk merged into jv branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17728
diff
changeset
|
55 |
!TwoByteEncoder methodsFor:'queries'! |
a1892eeca6c0
trunk merged into jv branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17728
diff
changeset
|
56 |
|
a1892eeca6c0
trunk merged into jv branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17728
diff
changeset
|
57 |
characterSize:codePoint |
a1892eeca6c0
trunk merged into jv branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17728
diff
changeset
|
58 |
|
a1892eeca6c0
trunk merged into jv branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17728
diff
changeset
|
59 |
^2 |
a1892eeca6c0
trunk merged into jv branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17728
diff
changeset
|
60 |
|
a1892eeca6c0
trunk merged into jv branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17728
diff
changeset
|
61 |
"Created: / 15-06-2005 / 15:12:01 / janfrog" |
a1892eeca6c0
trunk merged into jv branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17728
diff
changeset
|
62 |
! ! |
a1892eeca6c0
trunk merged into jv branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17728
diff
changeset
|
63 |
|
17735 | 64 |
!TwoByteEncoder methodsFor:'stream support'! |
65 |
||
66 |
readNextCharacterFrom:aStream |
|
67 |
| c | |
|
68 |
||
69 |
c := aStream nextUnsignedShortMSB:false. |
|
70 |
^ c isNil |
|
71 |
ifTrue: [nil] |
|
72 |
ifFalse: [(self decode:c) asCharacter] |
|
73 |
! |
|
74 |
||
75 |
readNextInputCharacterFrom:aStream |
|
76 |
^ aStream nextUnsignedShortMSB:false |
|
77 |
! ! |
|
78 |
||
8079 | 79 |
!TwoByteEncoder class methodsFor:'documentation'! |
80 |
||
81 |
version |
|
17767 | 82 |
^ '$Id: CharacterEncoderImplementations__TwoByteEncoder.st 10527 2010-06-16 20:12:05Z vranyj1 $' |
17735 | 83 |
! |
84 |
||
85 |
version_CVS |
|
17767 | 86 |
^ 'Header: /cvs/stx/stx/libbasic/Encoder_TwoByteEncoder.st,v 1.6 2009-11-04 00:47:35 cg Exp ยง' |
17761
b0e5971141bc
Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17735
diff
changeset
|
87 |
! |
17732
a1892eeca6c0
trunk merged into jv branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17728
diff
changeset
|
88 |
|
17761
b0e5971141bc
Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17735
diff
changeset
|
89 |
version_SVN |
17767 | 90 |
^ '$Id: CharacterEncoderImplementations__TwoByteEncoder.st 10527 2010-06-16 20:12:05Z vranyj1 $' |
17761
b0e5971141bc
Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17735
diff
changeset
|
91 |
! ! |
17767 | 92 |