BinarySerializer

interface BinarySerializer<T : Any>

A serializer for T to a binary format.

Inheritors

Functions

Link copied to clipboard
abstract fun copy(obj: T?): T?

Creates a deep copy of obj.

Link copied to clipboard
abstract fun read(reader: ByteReader): T?

Reads a value of type T? from reader.

Link copied to clipboard
fun <T : Any> BinarySerializer<T>.read(bytes: ByteArray, strict: Boolean = true): T?

Reads a value of type T from bytes.

Link copied to clipboard
abstract fun write(obj: T?, writer: ByteWriter)

Writes the given obj of type T? to writer.

Link copied to clipboard

Writes the given obj of type T to a ByteArray.