read

fun ReadableBuffer.read(size: Int, offset: Long = 0): ByteArray(source)

Reads size bytes from the native memory block, starting at offset, and returns them as a new ByteArray.

Throws

if the requested range is out of bounds in the native memory block.