Extensions for java.nio.charset.CharsetEncoder

charset

expect val CharsetEncoder.charset: Charset

encode

fun CharsetEncoder.encode(
    input: CharSequence,
    fromIndex: Int,
    toIndex: Int,
    dst: Output
): Unit
fun CharsetEncoder.encode(
    input: CharSequence,
    fromIndex: Int = 0,
    toIndex: Int = input.length
): ByteReadPacket
fun CharsetEncoder.encode(
    input: CharArray,
    fromIndex: Int,
    toIndex: Int,
    dst: Output
): Unit

encodeToByteArray

expect fun CharsetEncoder.encodeToByteArray(
    input: CharSequence,
    fromIndex: Int = 0,
    toIndex: Int = input.length
): ByteArray

encodeToByteArrayImpl

fun CharsetEncoder.encodeToByteArrayImpl(
    input: CharSequence,
    fromIndex: Int = 0,
    toIndex: Int = input.length
): ByteArray

encodeUTF8

expect fun CharsetEncoder.encodeUTF8(
    input: ByteReadPacket,
    dst: Output
): Unit
fun CharsetEncoder.encodeUTF8(
    input: ByteReadPacket
): ByteReadPacket