public static long copyLarge(Reader input, Writer output, char[] buffer) throws IOException {
        long count = 0;
        int n = 0;
        while (EOF != (n = input.read(buffer))) {
            output.write(buffer, 0, n);
            count += n;
        }
        return count;
    }
Copy chars from a large (over 2GB) <code>Reader</code> to a <code>Writer</code>.
<p>
This method uses the provided buffer, so there is no need to use a
<code>BufferedReader</code>.
<p>

@param input  the <code>Reader</code> to read from
@param output the <code>Writer</code> to write to
@param buffer the buffer to be used for the copy
@return the number of characters copied
@throws NullPointerException if the input or output is null
@throws IOException          if an I/O error occurs
@since 2.2
pay-java-common/src/main/java/com/egzosn/pay/common/util/IOUtils.java