TlvStreamSerializer

class TlvStreamSerializer<T : Tlv>(lengthPrefixed: Boolean, readers: Map<Long, TlvValueReader<T>>)

Parameters

lengthPrefixed

if true, the first bytes contain the total length of the serialized stream.

readers

custom readers that will be used to read tlv values.

Constructors

TlvStreamSerializer
Link copied to clipboard
common
fun <T : Tlv> TlvStreamSerializer(lengthPrefixed: Boolean, readers: Map<Long, TlvValueReader<T>>)

Functions

read
Link copied to clipboard
common
fun read(input: Input): TlvStream<T>
fun read(bytes: ByteArray): TlvStream<T>
write
Link copied to clipboard
common
fun write(message: TlvStream<T>): ByteArray
fun write(message: TlvStream<T>, out: Output)