BrushFamilySerialization



Summary

Public functions

BrushFamily?

Read a serialized BrushFamily from the given InputStream and parse it into a BrushFamily, returning null if parsing was not successful.

android
BrushFamily

Read a serialized BrushFamily from the given InputStream and parse it into a BrushFamily, throwing an exception if parsing was not successful.

android
Unit
encode(brushFamily: BrushFamily, output: OutputStream)

Write the gzip-compressed serialized representation of the BrushFamily to the given OutputStream.

android

Public functions

decodeOrNull

fun decodeOrNull(input: InputStream): BrushFamily?

Read a serialized BrushFamily from the given InputStream and parse it into a BrushFamily, returning null if parsing was not successful. The serialized representation is gzip-compressed ink.proto.BrushFamily binary proto messages, the same as written to OutputStream by encode. Kotlin callers should use BrushFamily.Companion.decodeOrNull instead.

decodeOrThrow

fun decodeOrThrow(input: InputStream): BrushFamily

Read a serialized BrushFamily from the given InputStream and parse it into a BrushFamily, throwing an exception if parsing was not successful. The serialized representation is gzip-compressed ink.proto.BrushFamily binary proto messages, the same as written to OutputStream by encode. Kotlin callers should use BrushFamily.Companion.decodeOrThrow instead.

encode

fun encode(brushFamily: BrushFamily, output: OutputStream): Unit

Write the gzip-compressed serialized representation of the BrushFamily to the given OutputStream. Kotlin callers should use BrushFamily.encode instead.