StrokeInputBatch.Companion


object StrokeInputBatch.Companion


Summary

Extension functions

ImmutableStrokeInputBatch

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

Extension functions

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

Read a serialized CodedStrokeInputBatch from the given InputStream and parse it into a ImmutableStrokeInputBatch, throwing an exception if parsing or validation was not successful. Java callers should use StrokeInputBatchSerialization.decode instead.

Parameters
input: InputStream

InputStream providing gzip-compressed ink.proto.CodedStrokeInputBatch binary proto messages, the same as written to OutputStream by encode.

Throws
java.io.IOException

if gzip-format bytes cannot be read from input.

kotlin.IllegalArgumentException

input does not provide a valid ink.proto.CodedStrokeInputBatch proto message, or the corresponding StrokeInputBatch is invalid.