ktor-io / io.ktor.utils.io / ByteReadChannel / readFully

readFully

abstract suspend fun readFully(dst: ByteArray, offset: Int, length: Int): Unit

Reads all length bytes to dst buffer or fails if channel has been closed. Suspends if not enough bytes available.

abstract suspend fun readFully(dst: IoBuffer, n: Int): Unit
abstract suspend fun readFully(dst: ByteBuffer): Int