List of usage examples for org.apache.commons.configuration XMLConfiguration save
public void save() throws ConfigurationException
From source file:pl.otros.logview.persistance.PersistentConfiguration.java
private static XMLConfiguration getXMLConfiguration(String file) { XMLConfiguration xmlConfiguration = new XMLConfiguration(); try {//from ww w.j a va 2 s. c o m xmlConfiguration = new XMLConfiguration(); xmlConfiguration.setFile(new File(file)); xmlConfiguration.load(); xmlConfiguration.setAutoSave(true); } catch (ConfigurationException e) { LOGGER.severe("Can't load configuration, creating new " + e.getMessage()); try { xmlConfiguration.save(); xmlConfiguration.setAutoSave(true); } catch (ConfigurationException e1) { LOGGER.severe("Can't create persistent configuration: " + e1.getMessage()); } } return xmlConfiguration; }