import java.io.*;

public class FileCopy {
   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 a character
	// and write it to the outputfile
	//

	int c;
	while((c = in.read()) != -1)
	    out.write(c);

	//
	// Close the input and the output files.
	//

	in.close();
	out.close();
    }
}
