// Check for file collisions, i.e. if the file already exists in the destination
int collision = FileCollisionChecker.checkForCollision(null, destFile);
if(collision!=FileCollisionChecker.NO_COLLOSION) {
// File already exists in destination, ask the user what to do (cancel, overwrite,...) but
// do not offer the multiple files mode options such as 'skip' and 'apply to all'.
int action = new FileCollisionDialog(getFrame(), getFrame()/*mainFrame*/, collision, null, destFile, false, false).getActionValue();
// User chose to overwrite the file
if (action== FileCollisionDialog.OVERWRITE_ACTION) {
// Do nothing, simply continue and file will be overwritten
}