Hi everyone,

after playing with FUEL in-memory (byte arrays) for a while, I am ready
to attack files. But... that's not so easy.

At
https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/Fuel/Fuel.html
I find the basic exxample

   'demo.fuel' asFileReference writeStreamDo: [ :aStream |
      FLSerializer newDefault
         serialize: 'stringToSerialize'
         on: aStream binary ].

It fails because ZnCharacterWriteStream does not understand #binary.

Browsing around a bit, I found another way:

   'demo.fuel' asFileReference writeStreamDo: [ :aStream |
      FLSerializer newDefault
         serialize: 'stringToSerialize'
         on: aStream binary ].

This works fine, the aStream being a ZnBufferedWriteStream. But on
larger objects, it ends up failing in

    FLBufferedWriteStream >> #nextBytePutAll:

which sends the message

    stream nextBytesPutAll: collection

But ZnBufferedWriteStream does not understand nextBytesPutAll: because
it is not a subclass of Stream for whatever reason.

Some further browing showed deprecated classes FileStream etc., and I
kind of suspect that file streams in Pharo were changed at some point
but FUEL still expects the old behavior.

Does anyone have an idea how to fix this, or work around it?

Thanks in advance,
  Konrad

Reply via email to