ReadStream documentation

# ReadStream

ReadStream inherits from Stream and defines no instance variables. It has no subclasses.

ReadStreams can only read from a collection.

## Methods defined in ReadStream:

### Methods for accessing:

- contents
- next
- next: count
  This could be optimized easily.

### Methods for enumerating:

- do: block
  Evaluate block for each _remaining_ element in the receiver.

### Methods for predicates:

- atEnd
- isEmpty
- notEmpty

### Methods for stream operations:

- peek
  Answers nil if there are no more elements.
- peekFor: object
  Answer whether the next object matches, and if so, advance the stream.
- skipThrough: object
  Skip until after object. Answer whether object was found at all.
- skipWhile: block
  Answers whether there are any more elements left.
- skipWhitespace
- upTo: object
  All elements up to (not inclusive of) object, or the entire rest of the collection if object is not there.

Pocket Smalltalk Documentation