public void dispose() {
        for (Object cachedFile : cachedFiles) {
            String fileName = (String) cachedFile;
            try {
                boolean success = (new File(fileName)).delete();
                if (!success && logger.isLoggable(Level.FINE)) {
                    logger.fine("Error deleting cached file " + fileName);
                }
            }
            catch (SecurityException e) {
                logger.log(Level.FINE,
                        "Security error removing cached file " + fileName, e);
            }
        }
    }