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

equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
read
Link copied to clipboard
common
abstract fun MemoryReader.read(offset: Int): T
Reads the object starting from offset.
toString
Link copied to clipboard
common
open fun toString(): String
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.