--- a/ObjectCoder.st Tue Jun 25 15:59:36 2002 +0200
+++ b/ObjectCoder.st Tue Jun 25 16:01:05 2002 +0200
@@ -117,15 +117,13 @@
"answer the encoded argument anObject"
stream isNil ifTrue:[
- stream := WriteStream on:(ByteArray new:20).
+ stream := self emptyStream.
] ifFalse:[
stream reset.
].
anObject encodeOn:self with:aParameter.
^ stream contents.
-
-
!
nextPut:anObject
@@ -156,6 +154,15 @@
!
+emptyStream
+ "answer an empty stream"
+
+ ^ (ByteArray new:20) writeStream.
+ "
+ ^ self subclassResponsibility
+ "
+!
+
flush
"flush possibly internally buffered data.
Nothing is done by default. Subclasses may redefine this"
@@ -186,5 +193,5 @@
!ObjectCoder class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/ObjectCoder.st,v 1.6 2002-03-27 10:51:54 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ObjectCoder.st,v 1.7 2002-06-25 14:01:05 stefan Exp $'
! !