clojuressh.input-stream

available

(available stream)

Return the number of bytes available and waiting to be read immediately in the stream

close

(close stream)

Close the stream

connect

(connect stream source)

Connect a PipedOutputStream to this stream.

new

(new)(new src-or-pipe-size)(new src pipe-size)

Create a new PipedInputStream on the pod heap. Return a reference to it for babashka use.

read

(read stream)(read stream bytes)(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.