Package-level declarations

Functions

Link copied to clipboard

Creates a blocking InputStream parented by the parent job.

Link copied to clipboard

Creates a blocking OutputStream parented by the parent job.

Link copied to clipboard
suspend fun ByteReadChannel.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
fun InputStream.toByteReadChannel(context: CoroutineContext = Dispatchers.IO, pool: ObjectPool<ByteBuffer>): ByteReadChannel
@JvmName(name = "toByteReadChannelWithArrayPool")
fun InputStream.toByteReadChannel(context: CoroutineContext = Dispatchers.IO, pool: ObjectPool<ByteArray> = ByteArrayPool): ByteReadChannel

Creates a ByteReadChannel that reads from this stream on demand in the given context. Reads block the executing thread. Use a dispatcher suitable for blocking I/O in context, such as Dispatchers.IO used by default.

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.