readBytes

abstract fun readBytes(sectionOffset: Long, buf: ByteArray, bufOffset: Int, size: Int)(source)

Reads bytes from the section.

If the specified range exceeds the actual size of the section, only the available data within the section is copied, leaving any extra space in the buffer unaltered.

Parameters

sectionOffset

the offset within the section to read from

buf

the buffer to read into

bufOffset

the offset within the buffer to read into

size

the number of bytes to read

Throws

if an I/O error occurs

if the bufOffset and the size is out of bounds