initial checkin
authorClaus Gittinger <cg@exept.de>
Wed, 03 Mar 2004 21:47:05 +0100
changeset 8047 9cfc575512eb
parent 8046 f1357bb6aa47
child 8048 293c8178c6eb
initial checkin
CharacterRangeError.st
EncodedStream.st
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CharacterRangeError.st	Wed Mar 03 21:47:05 2004 +0100
@@ -0,0 +1,17 @@
+"{ Encoding: iso8859-1 }"
+
+"{ Package: 'stx:libbasic' }"
+
+DecodingError subclass:#CharacterRangeError
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Collections-Text-Encodings'
+!
+
+
+!CharacterRangeError class methodsFor:'documentation'!
+
+version
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterRangeError.st,v 1.1 2004-03-03 20:46:40 cg Exp $'
+! !
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/EncodedStream.st	Wed Mar 03 21:47:05 2004 +0100
@@ -0,0 +1,51 @@
+"{ Encoding: iso8859-1 }"
+
+"{ Package: 'stx:libbasic' }"
+
+Stream subclass:#EncodedStream
+	instanceVariableNames:'encoder stream'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Collections-Text-Encodings'
+!
+
+
+!EncodedStream class methodsFor:'instance creation'!
+
+stream:streamArg encoder:encoder
+    ^ (self basicNew) stream:streamArg; encoder:encoder
+! !
+
+!EncodedStream methodsFor:'accessing'!
+
+encoder
+    ^ encoder
+!
+
+encoder:something
+    encoder := something.
+!
+
+stream
+    ^ stream
+!
+
+stream:something
+    stream := something.
+! !
+
+!EncodedStream methodsFor:'stream protocol'!
+
+nextPut:aCharacter
+    self nextPutAll:(aCharacter asString).
+!
+
+nextPutAll:aCollection
+    stream nextPutAll:(encoder encodeString:aCollection).
+! !
+
+!EncodedStream class methodsFor:'documentation'!
+
+version
+    ^ '$Header: /cvs/stx/stx/libbasic/EncodedStream.st,v 1.1 2004-03-03 20:47:05 cg Exp $'
+! !