code: private static void doCopyFile(File srcFile, File destFile, boolean preserveFileDate) throws IOException {
  		if (destFile.exists() && destFile.isDirectory()) {
  			throw new IOException("Destination '" + destFile + "' exists but is a directory");
  		}
  
  		FileInputStream input = new FileInputStream(srcFile);
  		FileOutputStream output = new FileOutputStream(destFile);
  		IOUtils.copy(input, output, true);
  
  		if (srcFile.length() != destFile.length()) {
  			throw new IOException("Failed to copy full contents from '" + srcFile + "' to '" + destFile + "'");
  		}
  		if (preserveFileDate) {
  			destFile.setLastModified(srcFile.lastModified());
  		}
  	}
docs: Internal copy file method.
  
  @param srcFile
  the validated source file, must not be <code>null</code>
  @param destFile
  the validated destination file, must not be <code>null</code>
  @param preserveFileDate
  whether to preserve the file date
  @throws IOException
  if an error occurs