/** * Copies the specified source file to the specified destination file. If the destination file does not exist, * it is created. * * @param src The source file name. * @param dst The destination file name. * @throws IOException if there is an issue copying the file */ public static void copyCheckedEx(File src, File dst) throws IOException { InputStream in = new FileInputStream(src); copy(in, dst); }
FileUtils.copy(in, destinationFile);
FileUtils.copy(sourceFile, destFile);