Java Code Examples for org.apache.commons.configuration2.PropertiesConfiguration#append()
The following examples show how to use
org.apache.commons.configuration2.PropertiesConfiguration#append() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SimpleConfiguration.java From fluo with Apache License 2.0 | 5 votes |
public void save(File file) { try (Writer writer = Files.newBufferedWriter(file.toPath())) { PropertiesConfiguration pconf = new PropertiesConfiguration(); pconf.append(internalConfig); pconf.getLayout().save(pconf, writer); } catch (ConfigurationException | IOException e) { throw new FluoException(e); } }
Example 2
Source File: SimpleConfiguration.java From fluo with Apache License 2.0 | 5 votes |
public void save(OutputStream out) { try { PropertiesConfiguration pconf = new PropertiesConfiguration(); pconf.append(internalConfig); pconf.getLayout().save(pconf, new OutputStreamWriter(out, UTF_8)); } catch (ConfigurationException e) { throw new FluoException(e); } }