import java.io.* ;
class Cp0 {
  static void cp
    (int size, InputStream in, OutputStream out) throws IOException {
    byte [] t = new byte [size] ;
    for ( ; ; ) {
      int nread = in.read(t, 0, size) ;
      if (nread == -1) break ;
      out.write(t, 0, nread) ;
    }
  }

  public static void main(String [] arg) {
    if (arg.length != 2) {
      System.err.println("Usage : java Cp0 name1 name2") ;
      System.exit(2) ;
    }
    String name1 = arg[0], name2 = arg[1] ;
    try {
      InputStream in = new FileInputStream (name1) ;
      OutputStream out = new FileOutputStream (name2) ;
      cp(8*1024, in, out) ;
      out.close() ; in.close() ;
    } catch (IOException e) {
      System.err.println("Malaise : " + e.getMessage()) ;
      System.exit(2) ;
    }
  }
}
