public static void copyFile(File in,File out) throws IOException {
  FileInputStream fis=new FileInputStream(in);
  FileOutputStream fos=new FileOutputStream(out);
  try {
    copyStream(fis,fos);
  }
  finally {
    fis.close();
    fos.close();
  }
}

public static void copyFile ( File in , File out ) throws IOException { FileInputStream fis = new FileInputStream ( in ) ; FileOutputStream fos = new FileOutputStream ( out ) ; try { copyStream ( fis , fos ) ; } finally { fis . close ( ) ; fos . close ( ) ; } }
copy a file from one place to another
