Class PropertiesConfiguration.DefaultIOFactory
java.lang.Object
org.apache.commons.configuration.PropertiesConfiguration.DefaultIOFactory
- All Implemented Interfaces:
PropertiesConfiguration.IOFactory
- Enclosing class:
PropertiesConfiguration
public static class PropertiesConfiguration.DefaultIOFactory
extends Object
implements PropertiesConfiguration.IOFactory
A default implementation of the IOFactory interface.
This class implements the createXXXX() methods defined by
the IOFactory interface in a way that the default objects
(i.e. PropertiesReader and PropertiesWriter are
returned. Customizing either the reader or the writer (or both) can be
done by extending this class and overriding the corresponding
createXXXX() method.
- Since:
- 1.7
- Version:
- $Id: PropertiesConfiguration.java 1534445 2013-10-22 01:19:43Z henning $
- Author:
- Stefano Mazzocchi, Jon S. Stevens, Dave Bryson, Geir Magnusson Jr., Leon Messerschmidt, Kent Johnson, Daniel Rall, Ilkka Priha, Jason van Zyl, Martin Poeschl, Henning P. Schmiedehausen, Eric Pugh, Emmanuel Bourg
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreatePropertiesReader(Reader in, char delimiter) Creates aPropertiesReaderfor reading a properties file.createPropertiesWriter(Writer out, char delimiter) Creates aPropertiesWriterfor writing a properties file.
-
Constructor Details
-
DefaultIOFactory
public DefaultIOFactory()
-
-
Method Details
-
createPropertiesReader
Description copied from interface:PropertiesConfiguration.IOFactoryCreates aPropertiesReaderfor reading a properties file. This method is called whenever thePropertiesConfigurationis loaded. The reader returned by this method is then used for parsing the properties file.- Specified by:
createPropertiesReaderin interfacePropertiesConfiguration.IOFactory- Parameters:
in- the underlying reader (of the properties file)delimiter- the delimiter character for list parsing- Returns:
- the
PropertiesReaderfor loading the configuration
-
createPropertiesWriter
Description copied from interface:PropertiesConfiguration.IOFactoryCreates aPropertiesWriterfor writing a properties file. This method is called before thePropertiesConfigurationis saved. The writer returned by this method is then used for writing the properties file.- Specified by:
createPropertiesWriterin interfacePropertiesConfiguration.IOFactory- Parameters:
out- the underlying writer (to the properties file)delimiter- the delimiter character for list parsing- Returns:
- the
PropertiesWriterfor saving the configuration
-