public static interface PropertiesConfiguration.IOFactory
Definition of an interface that allows customization of read and write operations.
For reading and writing properties files the inner classes PropertiesReader and PropertiesWriter are
used. This interface defines factory methods for creating both a PropertiesReader and a
PropertiesWriter. An object implementing this interface can be passed to the setIOFactory() method of
PropertiesConfiguration. Every time the configuration is read or written the IOFactory is asked to
create the appropriate reader or writer object. This provides an opportunity to inject custom reader or writer
implementations.
| Modifier and Type | Method and Description |
|---|---|
PropertiesConfiguration.PropertiesReader |
createPropertiesReader(Reader in)
Creates a
PropertiesReader for reading a properties file. |
PropertiesConfiguration.PropertiesWriter |
createPropertiesWriter(Writer out,
ListDelimiterHandler handler)
Creates a
PropertiesWriter for writing a properties file. |
PropertiesConfiguration.PropertiesReader createPropertiesReader(Reader in)
PropertiesReader for reading a properties file. This method is called whenever the
PropertiesConfiguration is loaded. The reader returned by this method is then used for parsing the properties
file.in - the underlying reader (of the properties file)PropertiesReader for loading the configurationPropertiesConfiguration.PropertiesWriter createPropertiesWriter(Writer out, ListDelimiterHandler handler)
PropertiesWriter for writing a properties file. This method is called before the
PropertiesConfiguration is saved. The writer returned by this method is then used for writing the properties
file.out - the underlying writer (to the properties file)handler - the list delimiter delimiter for list parsingPropertiesWriter for saving the configurationCopyright © 2001–2022 The Apache Software Foundation. All rights reserved.