open static fun copy(in: File, out: File): Int
Copy the contents of the given input File to the given output File.
IOException - in case of I/O errors
Return
the number of bytes copied
open static fun copy(in: ByteArray, out: File): Unit
Copy the contents of the given byte array to the given output File.
in - the byte array to copy from
IOException - in case of I/O errors
open static fun copy(in: InputStream, out: OutputStream): Int
Copy the contents of the given InputStream to the given OutputStream. Closes both streams when done.
IOException - in case of I/O errors
Return
the number of bytes copied
open static fun copy(in: ByteArray, out: OutputStream): Unit
Copy the contents of the given byte array to the given OutputStream. Closes the stream when done.
in - the byte array to copy from
out - the OutputStream to copy to
IOException - in case of I/O errors
open static fun copy(in: Reader, out: Writer): Int
Copy the contents of the given Reader to the given Writer. Closes both when done.
IOException - in case of I/O errors
Return
the number of characters copied
open static fun copy(in: String, out: Writer): Unit
Copy the contents of the given String to the given output Writer. Closes the writer when done.