BrushFamily.Companion



Summary

Public functions

BrushFamily.Builder

Returns a new BrushFamily.Builder.

Cmn

Extension functions

BrushFamily
BrushFamily.Companion.decode(
    input: InputStream,
    getClientTextureId: BrushFamilyDecodeCallback
)

See decode above.

android
BrushFamily
BrushFamily.Companion.decode(
    input: InputStream,
    maxVersion: Version,
    getClientTextureId: BrushFamilyDecodeCallback
)

Read a serialized BrushFamily from the given InputStream and parse it into a BrushFamily, throwing an exception if parsing or validation was not successful.

android
BrushFamily
@Throws(exceptionClasses = [IOException])
BrushFamily.Companion.decode(
    input: ByteArray,
    maxVersion: Version,
    onDecodeTexture: OnDecodeTexturePngBytes?
)

Read a serialized BrushFamily from the given ByteArray and parse it into a BrushFamily, throwing an exception if parsing or validation was not successful.

Cmn
BrushFamily
BrushFamily.Companion.decode(
    input: InputStream,
    maxVersion: Version,
    onDecodeTexture: OnDecodeTexturePngBytes?
)

Read a serialized BrushFamily from the given InputStream and parse it into a BrushFamily, throwing an exception if parsing or validation was not successful.

android

Public functions

builder

fun builder(): BrushFamily.Builder

Returns a new BrushFamily.Builder.

Extension functions

BrushFamily.Companion.decode

fun BrushFamily.Companion.decode(
    input: InputStream,
    getClientTextureId: BrushFamilyDecodeCallback
): BrushFamily

See decode above. This overload uses Version.MAX_SUPPORTED.

BrushFamily.Companion.decode

fun BrushFamily.Companion.decode(
    input: InputStream,
    maxVersion: Version,
    getClientTextureId: BrushFamilyDecodeCallback
): BrushFamily

Read a serialized BrushFamily from the given InputStream and parse it into a BrushFamily, throwing an exception if parsing or validation was not successful. Java callers should use AndroidBrushFamilySerialization.decode instead.

Parameters
input: InputStream

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

maxVersion: Version

The maximum Version to be supported by the deserializer. Proto objects with a min_version of greater than maxVersion will be rejected.

getClientTextureId: BrushFamilyDecodeCallback

A callback to store the decoded texture image, if one were encoded inside the serialized BrushFamily, into a TextureBitmapStore. This is called synchronously as part of this function call on the same thread.

Returns
BrushFamily

The BrushFamily 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.BrushFamily proto message, or the corresponding BrushFamily is invalid.

BrushFamily.Companion.decode

@Throws(exceptionClasses = [IOException])
fun BrushFamily.Companion.decode(
    input: ByteArray,
    maxVersion: Version = Version.MAX_SUPPORTED,
    onDecodeTexture: OnDecodeTexturePngBytes? = null
): BrushFamily

Read a serialized BrushFamily from the given ByteArray and parse it into a BrushFamily, throwing an exception if parsing or validation was not successful.

Parameters
input: ByteArray

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

maxVersion: Version = Version.MAX_SUPPORTED

The maximum Version supported by the deserializer. Proto objects with a min_version of greater than maxVersion will be rejected.

onDecodeTexture: OnDecodeTexturePngBytes? = null

A callback to store any decoded texture image, if any were encoded inside the serialized BrushFamily. This is called synchronously as part of this function call, on the same thread, once for each texture image.

Returns
BrushFamily

The BrushFamily parsed from the ByteArray.

Throws
IllegalArgumentException

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

IOException

if gzip-format bytes cannot be read from input.

BrushFamily.Companion.decode

fun BrushFamily.Companion.decode(
    input: InputStream,
    maxVersion: Version = Version.MAX_SUPPORTED,
    onDecodeTexture: OnDecodeTexturePngBytes? = null
): BrushFamily

Read a serialized BrushFamily from the given InputStream and parse it into a BrushFamily, throwing an exception if parsing or validation was not successful. Java callers should use BrushFamilySerialization.decode instead.

Parameters
input: InputStream

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

maxVersion: Version = Version.MAX_SUPPORTED

The maximum Version supported by the deserializer. Proto objects with a min_version of greater than maxVersion will be rejected.

onDecodeTexture: OnDecodeTexturePngBytes? = null

A callback to store any decoded texture image, if any were encoded inside the serialized BrushFamily. This is called synchronously as part of this function call, on the same thread, once for each texture image.

Returns
BrushFamily

The BrushFamily 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.BrushFamily proto message, or the corresponding BrushFamily is invalid.