W3cubDocs

/Kotlin

copyTo

Platform and version requirements: JVM (1.0)
fun Reader.copyTo(
    out: Writer, 
    bufferSize: Int = DEFAULT_BUFFER_SIZE
): Long

Copies this reader to the given out writer, returning the number of characters copied.

Note it is the caller's responsibility to close both of these resources.

Parameters

out - writer to write to.

bufferSize - size of character buffer to use in process.

Return number of characters copied.

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.io/java.io.-reader/copy-to.html