readFully

open fun readFully(pos: Long, buf: ByteArray)(source)

Reads exactly buf.size bytes starting at pos into the buffer.

This method repeatedly invokes readAtMost until the buffer is fully filled.

Throws

If the end of data is reached before reading all bytes

If an I/O error occurs


open fun readFully(pos: Long, buf: ByteArray, off: Int, len: Int)(source)

Reads exactly len bytes starting at pos into buf, beginning at offset off.

This method attempts to read until the requested region of the buffer is fully filled.

Throws

If the end of data is reached before reading all bytes

If any of pos, off, or len are invalid

If an I/O error occurs