StrokeInputBatch.Companion



Summary

Extension functions

ImmutableStrokeInputBatch

Read a serialized gzip-compressed ink.proto.CodedStrokeInputBatch from the given ByteArray and parse it into a ImmutableStrokeInputBatch, throwing an exception if parsing or validation was not successful.

Cmn
ImmutableStrokeInputBatch

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

android

Extension functions

StrokeInputBatch.Companion.decode

@Throws(exceptionClasses = [IOException])
fun StrokeInputBatch.Companion.decode(input: ByteArray): ImmutableStrokeInputBatch

Read a serialized gzip-compressed ink.proto.CodedStrokeInputBatch from the given ByteArray and parse it into a ImmutableStrokeInputBatch, throwing an exception if parsing or validation was not successful.

Parameters
input: ByteArray

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

Throws
IOException

if gzip-format bytes cannot be read from input.

IllegalArgumentException

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

StrokeInputBatch.Companion.decode

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

Read a serialized gzip-compressed ink.proto.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 by encode.

Throws
java.io.IOException

if gzip-format bytes cannot be read from input.

IllegalArgumentException

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