transferTo

abstract suspend fun transferTo(sink: suspend (bytes: ByteArray, offset: Int, length: Int) -> Unit)

Pull all bytes from this source into sink. The sink callback may be invoked many times with different offsets / lengths into a buffer the implementation owns; callers must not retain the bytes array beyond the duration of the call.