StrokeInputBatch.Companion


public static class StrokeInputBatch.Companion


Summary

Extension functions

static final ImmutableStrokeInputBatch

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

static final @NonNull 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

StrokeInputBatchSerialization.decodeOrNull

public static final ImmutableStrokeInputBatch StrokeInputBatchSerialization.decodeOrNull(
    @NonNull StrokeInputBatch.Companion receiver,
    @NonNull InputStream input
)

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.

StrokeInputBatchSerialization.decodeOrThrow

public static final @NonNull ImmutableStrokeInputBatch StrokeInputBatchSerialization.decodeOrThrow(
    @NonNull StrokeInputBatch.Companion receiver,
    @NonNull InputStream input
)

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.