PartitionedMesh.Companion



Declared as a target for extension functions.

Summary

Extension functions

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.

Cmn
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

Extension functions

PartitionedMesh.Companion.decode

@Throws(exceptionClasses = [IOException])
fun PartitionedMesh.Companion.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.

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

PartitionedMesh.Companion.decode

fun PartitionedMesh.Companion.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. Java callers should use PartitionedMeshSerialization.decode instead.

Parameters
input: InputStream

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