Package io.ktor.utils.io.core.internal

Types

ChunkBuffer

open class ChunkBuffer : Buffer

Annotations

DangerousInternalIoApi

annotation class DangerousInternalIoApi

API marked with this annotation is internal and extremely fragile and not intended to be used by library users. Such API could be changed without notice including rename, removal and behaviour change. Also using API marked with this annotation could cause data loss or any other damage.

Exceptions

MalformedUTF8InputException

class MalformedUTF8InputException : Exception

Functions

$unsafeAppend$

fun ByteReadPacket.$unsafeAppend$(
    builder: BytePacketBuilder
): Unit

afterHeadWrite

fun Output.afterHeadWrite(current: IoBuffer): Unit
fun Output.afterHeadWrite(current: ChunkBuffer): Unit

completeReadHead

fun Input.completeReadHead(current: IoBuffer): Unit
fun Input.completeReadHead(current: ChunkBuffer): Unit

decodeUTF8

fun IoBuffer.decodeUTF8(consumer: (Char) -> Boolean): Int
fun Buffer.decodeUTF8(consumer: (Char) -> Boolean): Int

Decodes all the bytes to utf8 applying every character on consumer until or consumer return false. If a consumer returned false then a character will be pushed back (including all surrogates will be pushed back as well) and decodeUTF8 returns -1

decodeUTF8LineLoopSuspend

suspend fun decodeUTF8LineLoopSuspend(
    out: Appendable,
    limit: Int,
    nextChunk: suspend (Int) -> AbstractInput?
): Boolean

prepareReadFirstHead

fun Input.prepareReadFirstHead(minSize: Int): ChunkBuffer?

prepareReadFirstHeadOld

fun Input.prepareReadFirstHeadOld(minSize: Int): IoBuffer?

prepareReadNextHead

fun Input.prepareReadNextHead(
    current: ChunkBuffer
): ChunkBuffer?

prepareReadNextHeadOld

fun Input.prepareReadNextHeadOld(
    current: IoBuffer
): IoBuffer?

prepareWriteHead

fun Output.prepareWriteHead(
    capacity: Int,
    current: IoBuffer?
): IoBuffer
fun Output.prepareWriteHead(
    capacity: Int,
    current: ChunkBuffer?
): ChunkBuffer