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.

open suspend fun readFully(dst: ByteArray): Unit
abstract suspend fun readFully(dst: ByteBuffer): Int