[Pharo-project] Help "migrating" from classic streams to XStreams

Mariano Martinez Peck marianopeck at gmail.com
Fri Jun 22 14:33:05 EDT 2012


On Fri, Jun 22, 2012 at 8:05 PM, Sean P. DeNigris <sean at clipperadams.com>wrote:

>
> Mariano Martinez Peck wrote
> >
> > For the moment, we are using the "classic" streams we want to give it a
> > try
> > to XStreams.
>
> Mariano, was there any progress on this?
>
>
Not really. The problem was that at that moment, the Fuel's design
regarding Streams was not very beatiful and we were depending on a lot of
messages on Streams. Now in Fuel 1.8 we have reified FLEncoder and
FLDecoder and hence we depend only on a few methods for streams:

Write stream:

nextPut: aSmallInteger
nextBytesPutAll: aBytesObject
nextWordsPut: aWordObject

Read stream:

next
next:numberOfBytes into: aBytesObject
nextInto: aCollection
fuelNextWordsInto: aWordsObject


So if someone help me to figure it out how to do it in XStreams let me know
and I try.  Moreover, we have also improved the tests and now you can run
all of them with the steam you want. Basically, you have to subclass
FLStreamStrategy and implement #writeStreamDo: and #readStreamDo:. So far
we have FLByteArrayStreamStrategy, FLFileStreamStrategy,
FLMultiByteStreamStrategy and FLFileSystemFileStreamStrategy (for FS).

So...the procedure is to create FLXSteamsStrategy accordly and start trying
to create (as extensions) the needed methods ;)

cheers,

-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20120622/5b88faf8/attachment.html>


More information about the Pharo-dev mailing list