PartitionedMeshSerialization



Summary

Public functions

PartitionedMesh
decode(input: ByteArray)

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.

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

android
ByteArray
encode(partitionedMesh: PartitionedMesh)

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

android
Unit
encode(partitionedMesh: PartitionedMesh, output: OutputStream)

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

android

Public functions

decode

fun decode(input: ByteArray): PartitionedMesh

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
input: ByteArray

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

Returns
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

fun decode(input: InputStream): 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. Kotlin callers should use PartitionedMesh.Companion.decode instead.

Parameters
input: InputStream

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

Returns
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

fun encode(partitionedMesh: PartitionedMesh): ByteArray

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

encode

fun encode(partitionedMesh: PartitionedMesh, output: OutputStream): Unit

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