MemoryWriter

interface MemoryWriter

The interface to write primitive types into this memory.

Functions

Link copied to clipboard
abstract fun release()

Disposes this writer if needed.

Link copied to clipboard
abstract fun writeByte(offset: Int, value: Byte)

Writes Byte at certain offset.

Link copied to clipboard
abstract fun writeDouble(offset: Int, value: Double)

Writes Double at certain offset.

Link copied to clipboard
abstract fun writeFloat(offset: Int, value: Float)

Writes Float at certain offset.

Link copied to clipboard
abstract fun writeInt(offset: Int, value: Int)

Writes Int at certain offset.

Link copied to clipboard
abstract fun writeLong(offset: Int, value: Long)

Writes Long at certain offset.

Link copied to clipboard
abstract fun writeShort(offset: Int, value: Short)

Writes Short at certain offset.

Properties

Link copied to clipboard
abstract val memory: Memory

The underlying memory.

Extensions

Link copied to clipboard
fun <T : Any> MemoryWriter.write(spec: MemorySpec<T>, offset: Int, value: T)

Writes the object value with spec starting from offset.

Link copied to clipboard
fun <T : Any> MemoryWriter.writeArray(spec: MemorySpec<T>, offset: Int, array: Array<T>)

Writes array of objects mapped by spec at certain offset.

Sources

Link copied to clipboard