StrokeInputBatchSerialization
public static class StrokeInputBatchSerialization
Summary
Public fields |
|
|---|---|
static @NonNull StrokeInputBatchSerialization |
Public methods |
|
|---|---|
static final @NonNull ImmutableStrokeInputBatch |
Read a serialized gzip-compressed |
static final @NonNull ImmutableStrokeInputBatch |
decode(@NonNull InputStream input)Read a serialized gzip-compressed |
static final @NonNull byte[] |
encode(@NonNull StrokeInputBatch strokeInputBatch)Write a gzip-compressed |
static final void |
encode(Write a gzip-compressed |
Public fields
Public methods
decode
public static final @NonNull ImmutableStrokeInputBatch decode(@NonNull byte[] input)
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. Kotlin callers should use StrokeInputBatch.Companion.decode instead.
| Parameters | |
|---|---|
@NonNull byte[] input |
|
| Returns | |
|---|---|
@NonNull ImmutableStrokeInputBatch |
The |
| Throws | |
|---|---|
IllegalArgumentException |
|
decode
public static final @NonNull ImmutableStrokeInputBatch decode(@NonNull InputStream input)
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. Kotlin callers should use StrokeInputBatch.Companion.decode instead.
| Parameters | |
|---|---|
@NonNull InputStream input |
|
| Returns | |
|---|---|
@NonNull ImmutableStrokeInputBatch |
The |
| Throws | |
|---|---|
java.io.IOException |
if gzip-format bytes cannot be read from |
IllegalArgumentException |
|
encode
public static final @NonNull byte[] encode(@NonNull StrokeInputBatch strokeInputBatch)
Write a gzip-compressed ink.proto.CodedStrokeInputBatch binary proto message representing the StrokeInputBatch to a ByteArray. Kotlin callers should use StrokeInputBatch.encode instead.
encode
public static final void encode(
@NonNull StrokeInputBatch strokeInputBatch,
@NonNull OutputStream output
)
Write a gzip-compressed ink.proto.CodedStrokeInputBatch binary proto message representing the StrokeInputBatch to the given OutputStream. Kotlin callers should use StrokeInputBatch.encode instead.