> On 11 Nov 2018, at 10:59, Hilaire <[email protected]> wrote:
> 
> I met that situation too with P7. It occurred to me that the precise
> need of #binaryReadStream message vanished.

I don't understand what you are saying.

Like Alistair says, FileReference is the public interface. The messages to open 
streams are

 #readStream
 #writeStream

for text streams (utf8 character encoded) and

 #binaryReadStream
 #binaryWriteStream

for raw unencoded binary streams. In most cases, it is better to use the #xDo: 
variant. It is no longer possible to switch streams using #binary. 

> Hilaire
> 
> Le 11/11/2018 à 10:03, Stephane Ducasse a écrit :
>> Hi
>> 
>> I'm checking some of the mooc code in Pharo 70.
>> 
>> The Pharo 50/60 version is
>> 
>> PNGReadWriter createAFormFrom: 'Sprites.png' asFileReference
>> binaryReadStream upToEnd
>> 
>> I came up with
>> 
>> PNGReadWriter formFromStream: (File named: 'Sprites.png') readStream
>> 
>> And we can also have
>> 
>> PNGReadWriter formFromStream: 'Sprites.png' asFileReference binaryReadStream
>> 
>> I will add this in the comment of the formFromStream: method.
>> 
>> Stef
>> 
> -- 
> Dr. Geo
> http://drgeo.eu
> 
> 
> 


Reply via email to