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 |
|
11995
|
55 |
!TwoByteEncoder methodsFor:'queries'!
|
|
56 |
|
|
57 |
characterSize:codePoint
|
|
58 |
|
|
59 |
^2
|
|
60 |
|
|
61 |
"Created: / 15-06-2005 / 15:12:01 / janfrog"
|
|
62 |
! !
|
|
63 |
|
12434
|
64 |
!TwoByteEncoder methodsFor:'stream support'!
|
|
65 |
|
|
66 |
readNextCharacterFrom:aStream
|
|
67 |
| c |
|
|
68 |
|
19215
|
69 |
c := aStream nextUnsignedInt16MSB:false.
|
12434
|
70 |
^ c isNil
|
|
71 |
ifTrue: [nil]
|
|
72 |
ifFalse: [(self decode:c) asCharacter]
|
|
73 |
!
|
|
74 |
|
|
75 |
readNextInputCharacterFrom:aStream
|
19215
|
76 |
^ aStream nextUnsignedInt16MSB:false
|
12434
|
77 |
! !
|
|
78 |
|
8079
|
79 |
!TwoByteEncoder class methodsFor:'documentation'!
|
|
80 |
|
|
81 |
version
|
19215
|
82 |
^ '$Header$'
|
12434
|
83 |
!
|
|
84 |
|
|
85 |
version_CVS
|
19215
|
86 |
^ '$Header$'
|
8079
|
87 |
! !
|
19215
|
88 |
|