AndroidMessage

abstract class AndroidMessage<M : Message<M, B>, B : Message.Builder<M, B>> : Message<M, B> , Parcelable

An Android-specific Message which adds support for Parcelable.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
@get:JvmName(name = "adapter")
actual val adapter: ProtoAdapter<M>

The ProtoAdapter for encoding and decoding messages of this type.

Link copied to clipboard
@get:JvmName(name = "unknownFields")
actual val unknownFields: ByteString

Returns a byte string containing the proto encoding of this message's unknown fields. Returns an empty byte string if this message has no unknown fields.

Functions

Link copied to clipboard
open override fun describeContents(): Int
Link copied to clipboard
actual fun encode(): ByteArray

Encode this message as a byte[].

fun encode(stream: OutputStream)
actual fun encode(sink: BufferedSink)

Encode this message and write it to stream.

Link copied to clipboard
actual fun encodeByteString(): ByteString

Encode this message as a ByteString.

Link copied to clipboard
actual abstract fun newBuilder(): B

Returns a new builder initialized with the data in this message.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard

Returns this message with any unknown fields removed.

Link copied to clipboard
open override fun writeToParcel(dest: Parcel, flags: Int)