Package-level declarations

Functions

Link copied to clipboard
suspend fun <Error class: unknown class>.copyTo(out: OutputStream, limit: Long = Long.MAX_VALUE): Long

Copies up to limit bytes from this byte channel to out stream suspending on read channel and blocking on output

Link copied to clipboard
@JvmName(name = "toByteReadChannelWithArrayPool")
fun InputStream.toByteReadChannel(context: CoroutineContext = Dispatchers.IO, pool: <Error class: unknown class><ByteArray> = ByteArrayPool): <Error class: unknown class>
fun InputStream.toByteReadChannel(context: CoroutineContext = Dispatchers.IO, pool: <Error class: unknown class><ByteBuffer>): <Error class: unknown class>

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
fun <Error class: unknown class>.toInputStream(parent: Job? = null): InputStream

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
fun <Error class: unknown class>.toOutputStream(): OutputStream

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