import java.io.*;

/** A utility to copy files */
public class FileCopier {

  /**
   * Copy the contents of file "infile" to file "outfile".
   * @param infile the file to be copied.
   * @param outfile the file to copy infile to.
   * @throws IOException if there is a problem reading from inFile.
   */
  public static void copy(String inFile, String outFile) throws
IOException {

    BufferedReader br = new BufferedReader(new FileReader(inFile));
    PrintStream p = new PrintStream(new FileOutputStream(outFile));

    String line = br.readLine();
    while(line != null) {
      p.println(line);
      line = br.readLine();
    }

  }
}
