Here you can find the source of copyLarge(Reader input, Writer output)
public static long copyLarge(Reader input, Writer output) throws IOException
//package com.java2s; //License from project: Apache License import java.io.IOException; import java.io.Reader; import java.io.Writer; public class Main { private static final int EOF = -1; private static final int DEFAULT_BUFFER_SIZE = 1024 * 4; public static long copyLarge(Reader input, Writer output) throws IOException { return copyLarge(input, output, new char[DEFAULT_BUFFER_SIZE]); }/*w w w . j av a 2 s .c om*/ 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; } }