List of usage examples for org.apache.commons.configuration.io FileHandler save
private void save(FileLocator locator) throws ConfigurationException
From source file:ubic.gemma.web.util.ConfigurationCookie.java
public void addProperty(String key, Object value) { this.configuration.addProperty(key, value); // Rewrite the value. StringWriter writer = new StringWriter(); try {/*from w w w .j a va 2 s. c o m*/ FileHandler fh = new FileHandler(configuration); fh.save(writer); } catch (ConfigurationException e) { throw new RuntimeException(e); } setValue(writer.toString().replaceAll("\n", PROPERTY_DELIMITER)); }
From source file:ubic.gemma.web.util.ConfigurationCookie.java
public void setProperty(String key, Object value) { this.configuration.setProperty(key, value); // Rewrite the value. StringWriter writer = new StringWriter(); try {/* ww w. j av a2 s . c om*/ FileHandler fh = new FileHandler(configuration); fh.save(writer); } catch (ConfigurationException e) { throw new RuntimeException(e); } setValue(PROPERTY_DELIMITER + writer.toString().replaceAll("\n", PROPERTY_DELIMITER)); }