LayoutProtoSerializer

object LayoutProtoSerializer implements Serializer


Serializes the proto for use with DataStore.

Summary

Public fields

@NonNull LayoutProto.LayoutConfig

Value to return if there is no data on disk.

Public methods

@NonNull LayoutProto.LayoutConfig

Unmarshal object from stream.

void

Marshal object to a stream.

Public fields

defaultValue

public @NonNull LayoutProto.LayoutConfig defaultValue

Value to return if there is no data on disk.

Public methods

readFrom

public @NonNull LayoutProto.LayoutConfig readFrom(InputStream input)

Unmarshal object from stream.

Parameters
InputStream input

the InputStream with the data to deserialize

writeTo

public void writeTo(LayoutProto.LayoutConfig t, OutputStream output)

Marshal object to a stream. Closing the provided OutputStream is a no-op.

Parameters
LayoutProto.LayoutConfig t

the data to write to output