Squeak Class Documentation category index | class index  
 
ReadStream
  category: Collections-Streams
  superclass: PositionableStream
  subclasses: InflateStream JPEGReadStream ChessMoveList

I represent an accessor for a sequence of objects that can only read objects from the sequence.

instance methods
  accessing
  ascii
binary
next
next:
next:into:startingAt:
nextPut:
size
upTo:
upToEnd

  private
  on:from:to:

class methods
  instance creation
  on:from:to:

instance methods
  accessing top  
 

ascii


 

binary


 

next

Primitive. Answer the next object in the Stream represented by the
receiver. Fail if the collection of this stream is not an Array or a String.
Fail if the stream is positioned at its end, or if the position is out of
bounds in the collection. Optional. See Object documentation
whatIsAPrimitive.


 

next:

Answer the next anInteger elements of my collection. overriden for efficiency


 

next:into:startingAt:

Read n objects into the given collection.
Return aCollection or a partial copy if less than
n elements have been read.


 

nextPut:

Insert the argument, anObject, as the next object accessible by the
receiver. Answer anObject.


 

size

Compatibility with other streams (e.g., FileStream)


 

upTo:

fast version using indexOf:


 

upToEnd

Answer a subcollection from the current access position through the last element of the receiver.


  private top  
 

on:from:to:


class methods
  instance creation top  
 

on:from:to:

Answer with a new instance streaming over a copy of aCollection from
firstIndex to lastIndex.