IOFormat

interface IOFormat<T : Any> : MetaRepr

And interface for reading and writing objects into with IO streams

Types

Companion
Link copied to clipboard
common
object Companion

Functions

readObject
Link copied to clipboard
common
abstract fun readObject(input: Input): T
toMeta
Link copied to clipboard
common
abstract fun toMeta(): Meta
writeObject
Link copied to clipboard
common
abstract fun writeObject(output: Output, obj: T)

Properties

type
Link copied to clipboard
common
abstract val type: KType

Inheritors

EnvelopeFormat
Link copied to clipboard
DoubleIOFormat
Link copied to clipboard
MetaFormat
Link copied to clipboard

Extensions

readObject
Link copied to clipboard
common
fun <T : Any> IOFormat<T>.readObject(binary: Binary): T
toBinary
Link copied to clipboard
common
fun <T : Any> IOFormat<T>.toBinary(obj: T): Binary
writeToFile
Link copied to clipboard
fun <T : Any> IOFormat<T>.writeToFile(path: Path, obj: T)

Write a binary into file. Throws an error if file already exists