Copy bytes from an InputStream to an OutputStream.
This method buffers the input internally, so there is no need to use a BufferedInputStream.
Large streams (over 2GB) will return a bytes copied value of -1 after the copy has completed since the correct number of bytes cannot be returned as an int. For large streams use the copyLarge(InputStream, OutputStream) method.
This method buffers the input internally, so there is no need to use a BufferedReader.
Large streams (over 2GB) will return a chars copied value of -1 after the copy has completed since the correct number of chars cannot be returned as an int. For large streams use the copyLarge(Reader, Writer) method.