use of java.beans.XMLEncoder in project wcomponents by BorderTech.
the class MenuPanel method storeRecentList.
/**
* Writes the list of recent selections to a file on the file system.
*/
private void storeRecentList() {
synchronized (recent) {
try {
OutputStream out = new BufferedOutputStream(new FileOutputStream(RECENT_FILE_NAME));
XMLEncoder encoder = new XMLEncoder(out);
encoder.writeObject(recent);
encoder.close();
} catch (IOException ex) {
LogFactory.getLog(getClass()).error("Unable to save recent list", ex);
}
}
}
Aggregations