public static void copyFile(File sourceFile,File destFile) throws IOException {
  if (!sourceFile.exists()) {
    throw new IOException("Does not exist: " + sourceFile.getAbsolutePath());
  }
  copyFile(new FileInputStream(sourceFile),new FileOutputStream(destFile));
}

public static void copyFile ( File sourceFile , File destFile ) throws IOException { if ( ! sourceFile . exists ( ) ) { throw new IOException ( "Does not exist: " + sourceFile . getAbsolutePath ( ) ) ; } copyFile ( new FileInputStream ( sourceFile ) , new FileOutputStream ( destFile ) ) ; }
copies the the given sourcefile to destfile , overwriting it , in case it exists .
