private void copy(File source, File destination) throws IOException {
      if (!destination.exists()) {
        if (!destination.createNewFile()) {
          throw new RuntimeException("Could not create destination file: " + destination.getAbsolutePath());
        }
      }

      FileChannel sourceChannel = null;
      FileChannel destinationChannel = null;
      try {
        sourceChannel = new FileInputStream(source).getChannel();
        destinationChannel = new FileOutputStream(destination).getChannel();
        destinationChannel.transferFrom(sourceChannel, 0, sourceChannel.size());
      } finally {
        if (sourceChannel != null) {
          sourceChannel.close();
        }
        if (destinationChannel != null) {
          destinationChannel.close();
        }
      }
    }