Companion

Functions

Link copied to clipboard
@JvmStatic
inline fun ByteArray.encodeBuffered(encoder: Encoder<*>, throwOnOverflow: Boolean, noinline action: (buf: CharArray, offset: Int, len: Int) -> Unit): Long

Encode a ByteArray using a buffer of maximum size DEFAULT_BUFFER_SIZE.

@JvmStatic
fun ByteArray.encodeBuffered(encoder: Encoder<*>, throwOnOverflow: Boolean, buf: CharArray, action: (buf: CharArray, offset: Int, len: Int) -> Unit): Long

Encode a ByteArray using the provided pre-allocated, reusable, buf array.

@JvmStatic
fun ByteArray.encodeBuffered(encoder: Encoder<*>, throwOnOverflow: Boolean, maxBufSize: Int, action: (buf: CharArray, offset: Int, len: Int) -> Unit): Long

Encode a ByteArray using a buffer of maximum size maxBufSize.

@JvmStatic
inline fun ByteArray.encodeBuffered(encoder: Encoder<*>, throwOnOverflow: Boolean, offset: Int, len: Int, noinline action: (buf: CharArray, offset: Int, len: Int) -> Unit): Long

Encode len number of bytes from the array, starting at index offset, using a buffer of maximum size DEFAULT_BUFFER_SIZE.

@JvmStatic
fun ByteArray.encodeBuffered(encoder: Encoder<*>, throwOnOverflow: Boolean, offset: Int, len: Int, buf: CharArray, action: (buf: CharArray, offset: Int, len: Int) -> Unit): Long

Encode len number of bytes from the array, starting at index offset, using the provided pre-allocated, reusable, buf array.

@JvmStatic
fun ByteArray.encodeBuffered(encoder: Encoder<*>, throwOnOverflow: Boolean, offset: Int, len: Int, maxBufSize: Int, action: (buf: CharArray, offset: Int, len: Int) -> Unit): Long

Encode len number of bytes from the array, starting at index offset, using a buffer of maximum size maxBufSize.

Link copied to clipboard
@JvmStatic
inline suspend fun ByteArray.encodeBufferedAsync(encoder: Encoder<*>, throwOnOverflow: Boolean, noinline action: suspend (buf: CharArray, offset: Int, len: Int) -> Unit): Long

Encode a ByteArray using a buffer of maximum size DEFAULT_BUFFER_SIZE.

@JvmStatic
suspend fun ByteArray.encodeBufferedAsync(encoder: Encoder<*>, throwOnOverflow: Boolean, buf: CharArray, action: suspend (buf: CharArray, offset: Int, len: Int) -> Unit): Long

Encode a ByteArray using the provided pre-allocated, reusable, buf array.

@JvmStatic
suspend fun ByteArray.encodeBufferedAsync(encoder: Encoder<*>, throwOnOverflow: Boolean, maxBufSize: Int, action: suspend (buf: CharArray, offset: Int, len: Int) -> Unit): Long

Encode a ByteArray using a buffer of maximum size maxBufSize.

@JvmStatic
inline suspend fun ByteArray.encodeBufferedAsync(encoder: Encoder<*>, throwOnOverflow: Boolean, offset: Int, len: Int, noinline action: suspend (buf: CharArray, offset: Int, len: Int) -> Unit): Long

Encode len number of bytes from the array, starting at index offset, using a buffer of maximum size DEFAULT_BUFFER_SIZE.

@JvmStatic
suspend fun ByteArray.encodeBufferedAsync(encoder: Encoder<*>, throwOnOverflow: Boolean, offset: Int, len: Int, buf: CharArray, action: suspend (buf: CharArray, offset: Int, len: Int) -> Unit): Long

Encode len number of bytes from the array, starting at index offset, using the provided pre-allocated, reusable, buf array.

@JvmStatic
suspend fun ByteArray.encodeBufferedAsync(encoder: Encoder<*>, throwOnOverflow: Boolean, offset: Int, len: Int, maxBufSize: Int, action: suspend (buf: CharArray, offset: Int, len: Int) -> Unit): Long

Encode len number of bytes from the array, starting at index offset, using a buffer of maximum size maxBufSize.

Link copied to clipboard
@JvmStatic
fun ByteArray.encodeToCharArray(encoder: Encoder<*>): CharArray

Encode a ByteArray.

@JvmStatic
fun ByteArray.encodeToCharArray(encoder: Encoder<*>, offset: Int, len: Int): CharArray

Encode len number of bytes from the array, starting at index offset.

Link copied to clipboard
@JvmStatic
fun ByteArray.encodeToString(encoder: Encoder<*>): String

Encode a ByteArray.

@JvmStatic
fun ByteArray.encodeToString(encoder: Encoder<*>, offset: Int, len: Int): String

Encode len number of bytes from the array, starting at index offset.