Jan. 7, 2012
1:59 p.m.
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). Sven