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

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

close

(close stream)

Closing a ByteArrayOutputStream has no effect.

new

(new)(new size)

reset

(reset stream)

Resets the count field of this byte array output stream to zero, so that all currently accumulated output in the output stream is discarded.

size

(size stream)

Returns the current size of the buffer.

to-byte-array

(to-byte-array stream)

creates a newly allocated byte-array containing the data and returns it.

to-string

(to-string stream)(to-string stream encoding)

Converts the buffer’s contents into a string decoding bytes using the platform’s default character set if encoding is not specified, else uses encoding.

write

(write stream byte)(write stream bytes offset length)

write a byte or bytes to the output stream.

write-to

(write-to stream out)

Writes the complete contents of this byte array output stream to the specified output stream argument.