[Pharo-project] I am serializing correctly with SIXX?

Mariano Martinez Peck marianopeck at gmail.com
Thu Jun 2 05:42:19 EDT 2011

>> serialize: anObject on: aStream
    | sws |
    sws := SixxWriteStream on: aStream.
    sws nextPut: anObject.
    sws close.

>> materializeFrom: aStream
    | srs objects |
    srs := SixxReadStream on: aStream.
    objects := srs contents.
    srs close.
    ^ objects

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...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20110602/98a2d745/attachment-0001.html>

More information about the Pharo-dev mailing list