Package-level declarations
Functions
Link copied to clipboard
fun InputStream.toByteReadChannel(context: CoroutineContext = Dispatchers.IO, pool: ObjectPool<ByteBuffer>): ByteReadChannel
fun InputStream.toByteReadChannel(context: CoroutineContext = Dispatchers.IO, pool: ObjectPool<ByteArray> = ByteArrayPool): ByteReadChannel
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
Link copied to clipboard
Create blocking java.io.InputStream for this channel that does block every time the channel suspends at read Similar to do reading in runBlocking however you can pass it to regular blocking API
Link copied to clipboard
Create blocking java.io.OutputStream for this channel that does block every time the channel suspends at write Similar to do reading in runBlocking however you can pass it to regular blocking API