copyTo
Deprecated (with error)
Use transferTo instead
Replace with
import kotlinx.io.transferTo
Content copied to clipboard
output.transferTo(this)
Content copied to clipboard
Copy all bytes to the output. Depending on actual input and output implementation it could be zero-copy or copy byte per byte. All regular types such as ByteReadPacket, BytePacketBuilder, Input and Output are always optimized so no bytes will be copied.