code: private static boolean copyFile(final File aSourceFile, final File aDestFile) throws IOException {
          FileOutputStream outputStream = null;
          FileInputStream inputStream = null;
          boolean success = true;
  
          // destructive copy
          if (aDestFile.exists() && !aDestFile.delete()) {
              success = false;
          }
  
          if (success && !aDestFile.createNewFile()) {
              LOGGER.warn(MessageCodes.UTIL_014, aDestFile.getAbsolutePath());
              success = false;
          }
  
          if (success) {
              try {
                  final FileChannel source;
  
                  outputStream = new FileOutputStream(aDestFile);
                  inputStream = new FileInputStream(aSourceFile);
                  source = inputStream.getChannel();
                  outputStream.getChannel().transferFrom(source, 0, source.size());
              } finally {
                  IOUtils.closeQuietly(outputStream);
                  IOUtils.closeQuietly(inputStream);
              }
          }
  
          if (success && aDestFile.exists() && aSourceFile.canRead()) {
              success = aDestFile.setReadable(true, true);
          }
  
          if (success && aDestFile.exists() && aSourceFile.canWrite()) {
              success = aDestFile.setWritable(true, true);
          }
  
          if (success && aDestFile.exists() && aSourceFile.canExecute()) {
              success = aDestFile.setExecutable(true, true);
          }
  
          if (!success && !aDestFile.delete() && LOGGER.isWarnEnabled()) {
              LOGGER.warn(MessageCodes.UTIL_015, aDestFile);
          }
  
          return success;
      }
docs: Copies a non-directory file from one location to another.
  
  @param aSourceFile A file to copy
  @param aDestFile A destination location for the copied file
  @return True if the copy was successful; else, false
  @throws IOException If there is a problem copying the file