androidx.ink.storage


Top-level functions summary

ImmutableStrokeInputBatch?

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

ImmutableStrokeInputBatch

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

Extension functions summary

ImmutableStrokeInputBatch?

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

ImmutableStrokeInputBatch

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

Unit

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

Top-level functions

decodeOrNull

fun decodeOrNull(input: InputStream): ImmutableStrokeInputBatch?

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

decodeOrThrow

fun decodeOrThrow(input: InputStream): ImmutableStrokeInputBatch

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

Extension functions

decodeOrNull

fun StrokeInputBatch.Companion.decodeOrNull(input: InputStream): ImmutableStrokeInputBatch?

Read a serialized CodedStrokeInputBatch from the given InputStream and parse it into an ImmutableStrokeInputBatch, returning null if parsing was not successful. The serialized representation is gzip-compressed ink.proto.CodedStrokeInputBatch binary proto messages, the same as written to OutputStream by StrokeInputBatch.encode. Java callers should use StrokeInputBatchSerialization.decodeStrokeInputBatchOrNull.

decodeOrThrow

fun StrokeInputBatch.Companion.decodeOrThrow(input: InputStream): ImmutableStrokeInputBatch

Read a serialized CodedStrokeInputBatch from the given InputStream and parse it into an ImmutableStrokeInputBatch, throwing an exception if parsing was not successful. The serialized representation is gzip-compressed ink.proto.CodedStrokeInputBatch binary proto messages, the same as written to OutputStream by StrokeInputBatch.encode. Java callers should use StrokeInputBatchSerialization.decodeStrokeInputBatchOrThrow.

fun StrokeInputBatch.encode(output: OutputStream): Unit

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