final String absolutePath = absolutePathFile.getAbsolutePath();
for (final File file : files) {
final Image image = Toolkit.getDefaultToolkit().getImage(file.getAbsolutePath());
final ImageIcon icon = new ImageIcon(image);
final String filename = file.getAbsolutePath().substring(absolutePath.length() + 1);
final ImageDimension dimension = new ImageDimension(filename, icon.getIconWidth(), icon.getIconHeight());
dimensions.add(dimension);
}
}
final FileWriter writer = new FileWriter(DIMENSION_FILE);
final XmlObjectWriter xmlWriter = new XmlObjectWriter();