PartitionedMeshSerialization


public static class PartitionedMeshSerialization


Summary

Public methods

static final @NonNull PartitionedMesh
decode(@NonNull byte[] input)

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

static final @NonNull PartitionedMesh

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

static final @NonNull byte[]
encode(@NonNull PartitionedMesh partitionedMesh)

Write a gzip-compressed ink.proto.CodedModeledShape binary proto message representing the PartitionedMesh to a ByteArray.

static final void
encode(
    @NonNull PartitionedMesh partitionedMesh,
    @NonNull OutputStream output
)

Write a gzip-compressed ink.proto.CodedModeledShape binary proto message representing the PartitionedMesh to the given OutputStream.

Public fields

INSTANCE

Added in 1.1.0-alpha11
public static @NonNull PartitionedMeshSerialization INSTANCE

Public methods

decode

Added in 1.1.0-alpha11
public static final @NonNull PartitionedMesh decode(@NonNull byte[] input)

Read a serialized gzip-compressed ink.proto.CodedModeledShape from the given ByteArray and parse it into a PartitionedMesh, throwing an exception if parsing or validation was not successful. Kotlin callers should use PartitionedMesh.Companion.decode instead.

Parameters
@NonNull byte[] input

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

Returns
@NonNull PartitionedMesh

The PartitionedMesh parsed from the ByteArray.

Throws
java.io.IOException

if gzip-format bytes cannot be read from input.

IllegalArgumentException

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

decode

Added in 1.1.0-alpha11
public static final @NonNull PartitionedMesh decode(@NonNull InputStream input)

Read a serialized gzip-compressed ink.proto.CodedModeledShape from the given InputStream and parse it into a PartitionedMesh, throwing an exception if parsing or validation was not successful. Kotlin callers should use PartitionedMesh.Companion.decode instead.

Parameters
@NonNull InputStream input

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

Returns
@NonNull PartitionedMesh

The PartitionedMesh parsed from the InputStream.

Throws
java.io.IOException

if gzip-format bytes cannot be read from input.

IllegalArgumentException

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

encode

Added in 1.1.0-alpha11
public static final @NonNull byte[] encode(@NonNull PartitionedMesh partitionedMesh)

Write a gzip-compressed ink.proto.CodedModeledShape binary proto message representing the PartitionedMesh to a ByteArray. Kotlin callers should use PartitionedMesh.encode instead.

encode

Added in 1.1.0-alpha11
public static final void encode(
    @NonNull PartitionedMesh partitionedMesh,
    @NonNull OutputStream output
)

Write a gzip-compressed ink.proto.CodedModeledShape binary proto message representing the PartitionedMesh to the given OutputStream. Kotlin callers should use PartitionedMesh.encode instead.