Extensions for java.nio.channels.Pipe

copyTo

suspend fun Pipe.copyTo(
    ch: ByteWriteChannel,
    limit: Long = Long.MAX_VALUE
): Long

Copies up to limit bytes from a blocking NIO pipe to CIO ch. A shortcut to copyTo with NIO readable channel receiver