public static void copy ( File sourceFile , File targetFile ) throws IOException { FileInputStream in = new FileInputStream ( sourceFile ) ; try { FileOutputStream out = new FileOutputStream ( targetFile ) ; try { copy ( in , out ) ; } finally { out . close ( ) ; } } finally { in . close ( ) ; } }
This method performs a simple copy of sourceFile to targetFile .