public static long copyLarge(final InputStream input, final OutputStream output)
        throws IOException {
        byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];
        long count = 0;
        int n = 0;
        while (-1 != (n = input.read(buffer))) {
            output.write(buffer, 0, n);
            count += n;
        }
        return count;
    }
Copies bytes from a large (over 2GB) <code>InputStream</code> to an
<code>OutputStream</code>.
<p>
This method uses the provided buffer, so there is no need to use a
<code>BufferedInputStream</code>.
<p>

@param input the <code>InputStream</code> to read from
@param output the <code>OutputStream</code> to write to
@return the number of bytes copied
@throws NullPointerException if the input or output is null
@throws IOException if an I/O error occurs
@since Commons IO 2.2
src/main/java/spark/utils/IOUtils.java