WritableBuffer

Region of native memory that can be written.

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.

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

Writes size bytes from source into the native memory block.