[Pharo-project] I am serializing correctly with SIXX?
norbert at hartl.name
Thu Jun 2 06:14:10 EDT 2011
Am 02.06.2011 um 11:42 schrieb Mariano Martinez Peck:
> >> serialize: anObject on: aStream
> | sws |
> sws := SixxWriteStream on: aStream.
> sws nextPut: anObject.
> sws close.
serialize: anObject on: aStream
anObject sixxOn: aStream
> >> materializeFrom: aStream
> | srs objects |
> srs := SixxReadStream on: aStream.
> objects := srs contents.
> srs close.
> ^ objects
^ Object readSixxFrom: aStream
> Is that correct or I am doing it wrong? All I want to do is to serialize a graph into a stream.
> The stream I am using is or this:
> (FileDirectory default forceNewFileNamed: 'Bench')
> (RWBinaryOrTextStream on: '')
> I am not sure if I should be doing a #nextPut: or a #nextPutAll:. I mean, sometimes anObject is a collection and sometimes it is not. So, which one should I use?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-dev