toByteReadChannel
fun InputStream.toByteReadChannel(context: CoroutineContext = Dispatchers.IO, pool: ObjectPool<ByteBuffer>): ByteReadChannel
Content copied to clipboard
fun InputStream.toByteReadChannel(context: CoroutineContext = Dispatchers.IO, pool: ObjectPool<ByteArray> = ByteArrayPool): ByteReadChannel
Content copied to clipboard
Open a channel and launch a coroutine to copy bytes from the input stream to the channel. Please note that it may block your async code when started on Dispatchers.Unconfined since InputStream is blocking on it's nature