PartitionedMeshExtensions

Added in 1.1.0-alpha11

public final class PartitionedMeshExtensions


Summary

Public methods

static final @NonNull PartitionedMesh
@Throws(exceptionClasses = [IOException])
decode(@NonNull PartitionedMesh.Companion receiver, @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
decode(
    @NonNull PartitionedMesh.Companion receiver,
    @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.

static final @NonNull byte[]

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

static final void

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

Public methods

@Throws(exceptionClasses = [IOException])
public static final @NonNull PartitionedMesh decode(@NonNull PartitionedMesh.Companion receiver, @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.

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
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.

public static final @NonNull PartitionedMesh decode(
    @NonNull PartitionedMesh.Companion receiver,
    @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. Java callers should use PartitionedMeshSerialization.decode instead.

Parameters
@NonNull InputStream input

InputStream providing gzip-compressed ink.proto.CodedModeledShape binary proto messages, the same as written 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.

public static final @NonNull byte[] encode(@NonNull PartitionedMesh receiver)

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

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

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