Next: , Previous: PositionableStream class-instance creation, Up: PositionableStream


1.130.2 PositionableStream: accessing-reading

close
Disassociate a stream from its backing store.


contents
Returns a collection of the same type that the stream accesses, up to and including the final element.


copyFrom: start to: end
Answer the data on which the receiver is streaming, from the start-th item to the end-th. Note that this method is 0-based, unlike the one in Collection, because a Stream's #position method returns 0-based values.


next
Answer the next item of the receiver. Returns nil when at end of stream.


nextAvailable: anInteger into: aCollection startingAt: pos
Place up to anInteger objects from the receiver into aCollection, starting from position pos in the collection and stopping if no more data is available.


nextAvailable: anInteger putAllOn: aStream
Copy up to anInteger objects from the receiver into aStream, stopping if no more data is available.


peek
Returns the next element of the stream without moving the pointer. Returns nil when at end of stream.


peekFor: anObject
Returns true and gobbles the next element from the stream of it is equal to anObject, returns false and doesn't gobble the next element if the next element is not equal to anObject.


readStream
Answer a ReadStream on the same contents as the receiver


reverseContents
Returns a collection of the same type that the stream accesses, up to and including the final element, but in reverse order.