MemorySpec

interface MemorySpec<T : Any>

A specification to read or write custom objects with fixed size in bytes.

Parameters

T

the type of object this spec manages.

Functions

read
Link copied to clipboard
common
abstract fun MemoryReader.read(offset: Int): T
Reads the object starting from offset.
write
Link copied to clipboard
common
abstract fun MemoryWriter.write(offset: Int, value: T)
Writes the object value starting from offset.

Properties

objectSize
Link copied to clipboard
common
abstract val objectSize: Int
Size of T in bytes after serialization.

Sources

common source
Link copied to clipboard