import java.io.*;

public class FastFileCopy {
   public static void main(String[] argv) throws IOException {
	//
	// Create an object for both files
	//

	File inputFile = new File(argv[0]);
	File outputFile = new File(argv[1]);

	//
	// Assoicate a file reader with the "inputFile" and
	// a file writer with the "outputFile"
	//

	FileReader in = new FileReader(inputFile);
	FileWriter out = new FileWriter(outputFile);

	//
	// While not the end of the input file, read an array of chars
	// and write it to the outputfile
	//

	char buffer[] = new char[1024];
        int amount;

	while((amount=in.read(buffer)) >= 0) {
	    out.write(buffer, 0, amount);
        }

	//
	// Close the input and the output files.
	//

	in.close();
	out.close();
    }
}
