added:
authorClaus Gittinger <cg@exept.de>
Wed, 04 Nov 2009 01:47:35 +0100
changeset 12434 7560b3932d74
parent 12433 b8654ecbc50d
child 12435 539c24148e90
added: #readNextCharacterFrom: #readNextInputCharacterFrom:
CharacterEncoderImplementations__TwoByteEncoder.st
Encoder_TwoByteEncoder.st
--- a/CharacterEncoderImplementations__TwoByteEncoder.st	Wed Nov 04 01:46:50 2009 +0100
+++ b/CharacterEncoderImplementations__TwoByteEncoder.st	Wed Nov 04 01:47:35 2009 +0100
@@ -61,8 +61,27 @@
     "Created: / 15-06-2005 / 15:12:01 / janfrog"
 ! !
 
+!TwoByteEncoder methodsFor:'stream support'!
+
+readNextCharacterFrom:aStream
+    | c |
+
+    c := aStream nextUnsignedShortMSB:false.
+    ^ c isNil 
+        ifTrue: [nil]
+        ifFalse: [(self decode:c) asCharacter]
+!
+
+readNextInputCharacterFrom:aStream
+    ^ aStream nextUnsignedShortMSB:false
+! !
+
 !TwoByteEncoder class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__TwoByteEncoder.st,v 1.5 2009-09-22 09:07:39 fm Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__TwoByteEncoder.st,v 1.6 2009-11-04 00:47:35 cg Exp $'
+!
+
+version_CVS
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__TwoByteEncoder.st,v 1.6 2009-11-04 00:47:35 cg Exp $'
 ! !
--- a/Encoder_TwoByteEncoder.st	Wed Nov 04 01:46:50 2009 +0100
+++ b/Encoder_TwoByteEncoder.st	Wed Nov 04 01:47:35 2009 +0100
@@ -61,8 +61,27 @@
     "Created: / 15-06-2005 / 15:12:01 / janfrog"
 ! !
 
+!TwoByteEncoder methodsFor:'stream support'!
+
+readNextCharacterFrom:aStream
+    | c |
+
+    c := aStream nextUnsignedShortMSB:false.
+    ^ c isNil 
+        ifTrue: [nil]
+        ifFalse: [(self decode:c) asCharacter]
+!
+
+readNextInputCharacterFrom:aStream
+    ^ aStream nextUnsignedShortMSB:false
+! !
+
 !TwoByteEncoder class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Attic/Encoder_TwoByteEncoder.st,v 1.5 2009-09-22 09:07:39 fm Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Attic/Encoder_TwoByteEncoder.st,v 1.6 2009-11-04 00:47:35 cg Exp $'
+!
+
+version_CVS
+    ^ '$Header: /cvs/stx/stx/libbasic/Attic/Encoder_TwoByteEncoder.st,v 1.6 2009-11-04 00:47:35 cg Exp $'
 ! !