ArrayInputStream

An input stream that reads from an array of items.

Members

Functions

readFromStream
StreamResult readFromStream(E[] buffer)

Reads items from this input stream's array into the given buffer, where successive read calls will read sequentially from the array, so that, for example, with an array [1, 2, 3, 4], reading with a buffer size of 2 will first read [1, 2], and then [3, 4].

reset
OptionalStreamError reset()

Resets this input stream's record of the next index to read from, so that the next call to read will read from the start of the array.

Meta