copyTo
Copies up to limit bytes from blocking NIO channel to CIO ch. It does suspend if no space available for writing in the destination channel but may block if source NIO channel blocks.
Return
number of bytes were copied
Copies up to limit bytes from a blocking NIO pipe to CIO ch. A shortcut to copyTo with NIO readable channel receiver
Return
number of bytes copied
suspend fun ByteReadChannel.copyTo(channel: WritableByteChannel, limit: Long = Long.MAX_VALUE): Long
Copy up to limit bytes to blocking NIO channel. Copying to a non-blocking channel requires selection and not supported. It is suspended if no data are available in a byte channel but may block if destination NIO channel blocks.
Return
number of bytes copied
Copy up to limit bytes to blocking pipe. A shortcut to copyTo function with NIO channel destination
Return
number of bytes were copied