
public class MainDriver2 {

	public static void main(String[] args) {
		
		try {
			File in = new FileImpl();
			File out = new FileImpl();
			
			in.open("input.txt");
			out.open("output.txt");
		
			char[] buffer = new char[1024];
			int bytesRead = in.read(buffer);
		
			out.write(buffer);
			in.close();
			out.close();
			
		} catch (Exception exc) {
			System.out.println("Exception: " + exc);
		} 
			// can catch other exceptions, like FileException
	}

}
