decodeToByteArrayOrNull

@JvmStatic
fun CharSequence.decodeToByteArrayOrNull(decoder: Decoder<*>): ByteArray?(source)

Decode a CharSequence.

Return

The array of decoded data, or null if there was an EncodingException.

Parameters

decoder

The Decoder to use.

See also


@JvmStatic
fun CharSequence.decodeToByteArrayOrNull(decoder: Decoder<*>, offset: Int, len: Int): ByteArray?(source)

Decode len number of characters from the sequence, starting at index offset.

Return

The array of decoded data, or null if there was an EncodingException.

Parameters

decoder

The Decoder to use.

offset

The index in the sequence to start at.

len

the number of characters, starting at index offset.

See also

Throws

IndexOutOfBoundsException

If offset or len are inappropriate.


@JvmStatic
fun CharArray.decodeToByteArrayOrNull(decoder: Decoder<*>): ByteArray?(source)

Decode a CharArray.

Return

The array of decoded data, or null if there was an EncodingException.

Parameters

decoder

The Decoder to use.

See also


@JvmStatic
fun CharArray.decodeToByteArrayOrNull(decoder: Decoder<*>, offset: Int, len: Int): ByteArray?(source)

Decode len number of characters from the array, starting at index offset.

Return

The array of decoded data, or null if there was an EncodingException.

Parameters

decoder

The Decoder to use.

offset

The index in the array to start at.

len

the number of characters, starting at index offset.

See also

Throws

IndexOutOfBoundsException

If offset or len are inappropriate.