androidx.ink.storage
Interfaces
BrushFamilyDecodeCallback |
android
|
Objects
AndroidBrushFamilySerialization |
android
|
|
BrushFamilySerialization |
android
|
|
StrokeInputBatchSerialization |
android
|
Extension functions summary
BrushFamily? |
Read a serialized |
android
|
ImmutableStrokeInputBatch? |
Read a serialized CodedStrokeInputBatch from the given |
android
|
BrushFamily? |
@ExperimentalInkCustomBrushApi Read a serialized |
android
|
BrushFamily |
Read a serialized |
android
|
ImmutableStrokeInputBatch |
Read a serialized CodedStrokeInputBatch from the given |
android
|
BrushFamily |
@ExperimentalInkCustomBrushApi Read a serialized |
android
|
Unit |
BrushFamily.encode(output: OutputStream) Write the gzip-compressed serialized representation of the |
android
|
Unit |
StrokeInputBatch.encode(output: OutputStream) Write the gzip-compressed serialized representation of the CodedStrokeInputBatch to the given |
android
|
Unit |
@ExperimentalInkCustomBrushApi Write the gzip-compressed serialized representation of the |
android
|
Extension functions
decodeOrNull
fun BrushFamily.Companion.decodeOrNull(input: InputStream): BrushFamily?
Read a serialized BrushFamily
from the given InputStream
and parse it into a BrushFamily
, returning null
if parsing was not successful. The serialized representation is gzip-compressed ink.proto.BrushFamily
binary proto messages, the same as written to OutputStream
by BrushFamily.encode
. Java callers should use BrushFamilySerialization.decodeOrNull
.
decodeOrNull
fun StrokeInputBatch.Companion.decodeOrNull(input: InputStream): ImmutableStrokeInputBatch?
Read a serialized CodedStrokeInputBatch from the given InputStream
and parse it into an ImmutableStrokeInputBatch
, returning null
if parsing was not successful. The serialized representation is gzip-compressed ink.proto.CodedStrokeInputBatch
binary proto messages, the same as written to OutputStream
by StrokeInputBatch.encode
. Java callers should use StrokeInputBatchSerialization.decodeOrNull
.
decodeOrNull
@ExperimentalInkCustomBrushApi
fun BrushFamily.Companion.decodeOrNull(
input: InputStream,
getClientTextureId: BrushFamilyDecodeCallback
): BrushFamily?
Read a serialized BrushFamily
from the given InputStream
and parse it into a BrushFamily
, returning null
if parsing was not successful. The serialized representation is gzip-compressed ink.proto.BrushFamily
binary proto messages, the same as written to OutputStream
by BrushFamily.encode
. Java callers should use AndroidBrushFamilySerialization.decodeOrNull
.
getClientTextureId
is called synchronously as part of this function call, on the same thread.
decodeOrThrow
fun BrushFamily.Companion.decodeOrThrow(input: InputStream): BrushFamily
Read a serialized BrushFamily
from the given InputStream
and parse it into a BrushFamily
, throwing an exception if parsing was not successful. The serialized representation is gzip-compressed ink.proto.BrushFamily
binary proto messages, the same as written to OutputStream
by BrushFamily.encode
. Java callers should use BrushFamilySerialization.decodeOrThrow
.
decodeOrThrow
fun StrokeInputBatch.Companion.decodeOrThrow(input: InputStream): ImmutableStrokeInputBatch
Read a serialized CodedStrokeInputBatch from the given InputStream
and parse it into an ImmutableStrokeInputBatch
, throwing an exception if parsing was not successful. The serialized representation is gzip-compressed ink.proto.CodedStrokeInputBatch
binary proto messages, the same as written to OutputStream
by StrokeInputBatch.encode
. Java callers should use StrokeInputBatchSerialization.decodeOrThrow
.
decodeOrThrow
@ExperimentalInkCustomBrushApi
fun BrushFamily.Companion.decodeOrThrow(
input: InputStream,
getClientTextureId: BrushFamilyDecodeCallback
): BrushFamily
Read a serialized BrushFamily
from the given InputStream
and parse it into a BrushFamily
, throwing an exception if parsing was not successful. The serialized representation is gzip-compressed ink.proto.BrushFamily
binary proto messages, the same as written to OutputStream
by BrushFamily.encode
. Java callers should use AndroidBrushFamilySerialization.decodeOrThrow
.
getClientTextureId
is called synchronously as part of this function call, on the same thread.
encode
fun BrushFamily.encode(output: OutputStream): Unit
Write the gzip-compressed serialized representation of the BrushFamily
to the given OutputStream
.
encode
fun StrokeInputBatch.encode(output: OutputStream): Unit
Write the gzip-compressed serialized representation of the CodedStrokeInputBatch to the given OutputStream
.
encode
@ExperimentalInkCustomBrushApi
fun BrushFamily.encode(
output: OutputStream,
textureBitmapStore: TextureBitmapStore
): Unit
Write the gzip-compressed serialized representation of the BrushFamily
to the given OutputStream
.