ktor-io / io.ktor.utils.io / ByteChannelSequentialBase / readFully

readFully

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

Overrides ByteReadChannel.readFully

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

Overrides ByteReadChannel.readFully

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