Package org.apache.commons.configuration
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 java.lang.Object implements PropertiesConfiguration.IOFactory
A default implementation of the
IOFactory
interface.This class implements the
createXXXX()
methods defined by theIOFactory
interface in a way that the default objects (i.e.PropertiesReader
andPropertiesWriter
are returned. Customizing either the reader or the writer (or both) can be done by extending this class and overriding the correspondingcreateXXXX()
method.- Since:
- 1.7
-
-
Constructor Summary
Constructors Constructor Description DefaultIOFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertiesConfiguration.PropertiesReader
createPropertiesReader(java.io.Reader in, char delimiter)
Creates aPropertiesReader
for reading a properties file.PropertiesConfiguration.PropertiesWriter
createPropertiesWriter(java.io.Writer out, char delimiter)
Creates aPropertiesWriter
for writing a properties file.
-
-
-
Constructor Detail
-
DefaultIOFactory
public DefaultIOFactory()
-
-
Method Detail
-
createPropertiesReader
public PropertiesConfiguration.PropertiesReader createPropertiesReader(java.io.Reader in, char delimiter)
Description copied from interface:PropertiesConfiguration.IOFactory
Creates aPropertiesReader
for reading a properties file. This method is called whenever thePropertiesConfiguration
is loaded. The reader returned by this method is then used for parsing the properties file.- Specified by:
createPropertiesReader
in interfacePropertiesConfiguration.IOFactory
- Parameters:
in
- the underlying reader (of the properties file)delimiter
- the delimiter character for list parsing- Returns:
- the
PropertiesReader
for loading the configuration
-
createPropertiesWriter
public PropertiesConfiguration.PropertiesWriter createPropertiesWriter(java.io.Writer out, char delimiter)
Description copied from interface:PropertiesConfiguration.IOFactory
Creates aPropertiesWriter
for writing a properties file. This method is called before thePropertiesConfiguration
is saved. The writer returned by this method is then used for writing the properties file.- Specified by:
createPropertiesWriter
in interfacePropertiesConfiguration.IOFactory
- Parameters:
out
- the underlying writer (to the properties file)delimiter
- the delimiter character for list parsing- Returns:
- the
PropertiesWriter
for saving the configuration
-
-