decodeOrNull

fun <T : ERROR CLASS: Symbol not found for Message<T, *>> ERROR CLASS: Symbol not found for ProtoAdapter<T>.decodeOrNull(bytes: ERROR CLASS: Symbol not found for ByteString??, logger: ERROR CLASS: Symbol not found for Logger?? = null): T?(source)


fun <T : ERROR CLASS: Symbol not found for Message<T, *>> ERROR CLASS: Symbol not found for ProtoAdapter<T>.decodeOrNull(bytes: ByteArray?, logger: ERROR CLASS: Symbol not found for Logger?? = null): T?(source)

Safely decode a proto message from ByteArray, returning null on error.

Convenience overload for ByteArray inputs, automatically converting to ByteString.

Return

The decoded message, or null if bytes is null or decoding fails

Parameters

bytes

The ByteArray to decode, or null

logger

Optional logger for error reporting