Package io.ktor.utils.io.jvm.nio
Functions
Link copied to clipboard
suspend fun ByteReadChannel.copyTo(pipe: Pipe, limit: Long = Long.MAX_VALUE): Long
Content copied to clipboard
suspend fun ByteReadChannel.copyTo(channel: WritableByteChannel, limit: Long = Long.MAX_VALUE): Long
Content copied to clipboard
Copy up to limit bytes to blocking NIO channel. Copying to non-blocking channel requires selection and not supported. It does suspend if no data available in byte channel but may block if destination NIO channel blocks.
suspend fun Pipe.copyTo(ch: ByteWriteChannel, limit: Long = Long.MAX_VALUE): Long
Content copied to clipboard
Copies up to limit bytes from a blocking NIO pipe to CIO ch. A shortcut to copyTo with NIO readable channel receiver
suspend fun ReadableByteChannel.copyTo(ch: ByteWriteChannel, limit: Long = Long.MAX_VALUE): Long
Content copied to clipboard