wire-runtime / com.squareup.wire / ProtoAdapter / encode

encode

abstract fun encode(writer: ProtoWriter, value: E): Unit

Write non-null value to writer.

fun encode(sink: BufferedSink, value: E): Unit
fun encode(stream: OutputStream, value: E): Unit

Encode value and write it to stream.

fun encode(value: E): ByteArray

Encode value as a byte[].