Skip to content

okio / okio / Buffer / copyTo

copyTo

(js, jvm) fun copyTo(out:Buffer, offset:Long= 0L, byteCount:Long):Buffer(native) fun copyTo(out:Buffer, offset:Long, byteCount:Long):Buffer

Copy byteCount bytes from this, starting at offset, to out.

(js, jvm) fun copyTo(out:Buffer, offset:Long= 0L):Buffer(native) fun copyTo(out:Buffer, offset:Long):Buffer

Overload of copyTo with byteCount = size - offset, work around for https://youtrack.jetbrains.com/issue/KT-30847

(jvm) @JvmOverloads fun copyTo(out:OutputStream, offset:Long= 0L, byteCount:Long= size - offset):Buffer

Copy byteCount bytes from this, starting at offset, to out.