pod.epiccastle.bbssh.byte-array-input-stream

Creates and calls the various methods of a ByteArrayInputStream that exists on the pod heap.

available

(available stream)

Returns the number of remaining bytes that can be read (or skipped over) from this input stream.

close

(close stream)

Closing a ByteArrayInputStream has no effect.

mark

(mark stream read-ahead-limit)

Set the current marked position in the stream.

mark-supported

(mark-supported stream)

Tests if this InputStream supports mark/reset.

new

(new string-or-bytes & [encoding])

read

(read stream)(read stream bytes offset length)

(read stream) Read a single byte from the stream. Returns an int. Blocks if a byte is not available.

(read stream byte-array offset length) Try and read length bytes from the stream and store them into a byte-array starting at offset. Returns the number of bytes successfully read. Does not block.

reset

(reset stream)

Resets the buffer to the marked position.

skip

(skip stream n)

Skips n bytes of input from this input stream.