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

Types

Link copied to clipboard
open class ChunkBuffer(memory: Memory, origin: ChunkBuffer?, parentPool: ObjectPool<ChunkBuffer>?) : Buffer
Link copied to clipboard
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.

Link copied to clipboard
class MalformedUTF8InputException(message: String) : Exception

Functions

Link copied to clipboard
fun Output.afterHeadWrite(current: IoBuffer)
fun Output.afterHeadWrite(current: ChunkBuffer)
Link copied to clipboard
fun Input.completeReadHead(current: IoBuffer)
fun Input.completeReadHead(current: ChunkBuffer)
Link copied to clipboard
inline 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

inline fun IoBuffer.decodeUTF8(consumer: (Char) -> Boolean): Int
Link copied to clipboard
suspend fun decodeUTF8LineLoopSuspend(out: Appendable, limit: Int, nextChunk: suspend (Int) -> AbstractInput?): Boolean
Link copied to clipboard
fun Input.prepareReadFirstHead(minSize: Int): ChunkBuffer?
Link copied to clipboard
@JvmName(name = "prepareReadFirstHead")
fun Input.prepareReadFirstHeadOld(minSize: Int): IoBuffer?
Link copied to clipboard
fun Input.prepareReadNextHead(current: ChunkBuffer): ChunkBuffer?
Link copied to clipboard
@JvmName(name = "prepareReadNextHead")
fun Input.prepareReadNextHeadOld(current: IoBuffer): IoBuffer?
Link copied to clipboard
fun Output.prepareWriteHead(capacity: Int, current: IoBuffer?): IoBuffer
fun Output.prepareWriteHead(capacity: Int, current: ChunkBuffer?): ChunkBuffer