[Pharo-project] Bug in FileSystem

Sven Van Caekenberghe sven at beta9.be
Sat Jan 7 08:59:47 EST 2012

On 07 Jan 2012, at 14:19, Henrik Sperre Johansen wrote:

> 1) There's no next: into: (which returns the amount read). It's really the only way to do buffers without garbage allocations.

The 2 key methods for efficient IO are:

readInto: collection startingAt: offset count: requestedCount
	"Read requestedCount elements into collection starting at offset,
	returning the number of elements read, there could be less elements available."

next: count putAll: collection startingAt: offset
	"Write count bytes from collection starting at offset."

All other bulk operations can be written in terms of these (see for example Zodiac streams).


More information about the Pharo-dev mailing list