ReadableBuffer

abstract class ReadableBuffer(source)

Region of native memory that can be read.

Inheritors

Properties

Link copied to clipboard

Size of the memory region in bytes.

Functions

Link copied to clipboard
fun read(destination: ByteArray, size: Int = destination.size, sourceOffset: Long = 0, destinationOffset: Int = 0)

Reads size bytes from the native memory block into destination.

Link copied to clipboard
fun ReadableBuffer.read(size: Int, offset: Long = 0): ByteArray

Reads size bytes from the native memory block and returns a ByteArray holding them.

Link copied to clipboard

Reads at most Int.MAX_VALUE bytes from this buffer.

Link copied to clipboard

Reads all bytes from this buffer.