apparently without the repositioning of the stream the mineEncode does not get fed up character and so nothing happen.
Stef On Jan 16, 2010, at 12:12 PM, Stéphane Ducasse wrote: > now > > > mimeEncode: aStream > "Return a ReadWriteStream of characters. The data of aStream is > encoded as 65 innocuous characters. (See class comment). 3 bytes in aStream > goes to 4 bytes in output." > > | me | > me := self new dataStream: aStream. > me mimeStream: (ReadWriteStream on: (String new: aStream size + 20 * 4 > // 3)). > me mimeEncode. > me mimeStream position: 0. > ^ me mimeStream > > testMimeEncodeDecode > > | encoded | > encoded := Base64MimeConverter mimeEncode: message. > self assert: (encoded contents = 'SGkgVGhlcmUh'). > self assert: ((Base64MimeConverter mimeDecodeToChars: encoded) contents = > message contents). > > > encoded contents = '' > > :( > > Stef > _______________________________________________ > Pharo-project mailing list > [email protected] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
