write

inline fun <T : Any> write(value: T?, writer: ByteWriter)

Writes value of the reified type T? to the writer.

Throws

if no serializer is registered for the type

if the creation of a serializer was prevented by the security manager


inline fun <T : Any> write(value: T?): ByteArray

Writes value of the reified type T? to a ByteArray.

Throws

if no serializer is registered for the type

if the creation of a serializer was prevented by the security manager


fun <T : Any> write(type: KType, value: T?, writer: ByteWriter)

Writes value of the type T? (type) to the writer.

Throws

if no serializer is registered for the type

if the creation of a serializer was prevented by the security manager


fun <T : Any> write(type: KType, value: T?): ByteArray

Writes value of the type T? (type) to a ByteArray.

Throws

if no serializer is registered for the type

if the creation of a serializer was prevented by the security manager