mirai-core / net.mamoe.mirai.utils / kotlinx.coroutines.io.ByteReadChannel / copyTo

copyTo

suspend fun ByteReadChannel.copyTo(dst: OutputStream): Unit
suspend fun ByteReadChannel.copyTo(dst: Output): Unit
suspend fun ByteReadChannel.copyTo(dst: ByteWriteChannel): Unit

从接收者管道读取所有数据并写入 dst. 不会关闭 dst