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