// file stream demo - both read and write streams of characters
import java.io.*;

class FileCopy {


	public static void main (String args[]) {

		File infile, outfile;
		FileInputStream fis;	// file read stream
		FileOutputStream fos; // file write stream

		try {
			infile = new File (args[0]);
			outfile = new File (args[1]);

			fis = new FileInputStream(infile);
			fos = new FileOutputStream (outfile);

			int b;
			while ( (b=fis.read()) != -1) {

				fos.write(b);
			}
			fis.close();
			fos.close();
		} catch (Exception e) {System.out.println("An exception");}

	}
}



