read

fun read(out: ByteArray): Int(source)

Reads the Xof snapshot's state for when Reader was produced, filling the provided out array completely.

This can be called multiple times until close has been invoked.

Return

The number of bytes written to out

Parameters

out

The array to fill

Throws

IllegalStateException

if isClosed is true


fun read(out: ByteArray, offset: Int, len: Int): Int(source)

Reads the Xof snapshot's state for when Reader was produced, filling the provided out array for specified offset and len arguments.

This can be called multiple times until close has been invoked.

Return

The number of bytes written to out

Parameters

out

The array to put the data into

offset

The index for out to start putting data

len

The number of bytes to put into out

Throws

IllegalArgumentException

if offset and/or len are inappropriate

IllegalStateException

if isClosed is true

IndexOutOfBoundsException

if offset and/or len are inappropriate