Class PropertiesConfiguration.JupPropertiesReader
- java.lang.Object
-
- java.io.Reader
-
- java.io.BufferedReader
-
- java.io.LineNumberReader
-
- org.apache.commons.configuration2.PropertiesConfiguration.PropertiesReader
-
- org.apache.commons.configuration2.PropertiesConfiguration.JupPropertiesReader
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.lang.Readable
- Enclosing class:
- PropertiesConfiguration
public static class PropertiesConfiguration.JupPropertiesReader extends PropertiesConfiguration.PropertiesReader
APropertiesConfiguration.PropertiesReader
that tries to mimic the behavior ofProperties
.- Since:
- 2.4
-
-
Constructor Summary
Constructors Constructor Description JupPropertiesReader(java.io.Reader reader)
Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
parseProperty(java.lang.String line)
Parses a line read from the properties file.java.lang.String
readProperty()
Reads a property line.protected java.lang.String
unescapePropertyValue(java.lang.String value)
Performs unescaping on the given property value.-
Methods inherited from class org.apache.commons.configuration2.PropertiesConfiguration.PropertiesReader
getCommentLines, getPropertyName, getPropertySeparator, getPropertyValue, initPropertyName, initPropertySeparator, initPropertyValue, nextProperty, unescapePropertyName
-
-
-
-
Method Detail
-
parseProperty
protected void parseProperty(java.lang.String line)
Description copied from class:PropertiesConfiguration.PropertiesReader
Parses a line read from the properties file. This method is called for each non-comment line read from the source file. Its task is to split the passed in line into the property key and its value. The results of the parse operation can be stored by calling theinitPropertyXXX()
methods.- Overrides:
parseProperty
in classPropertiesConfiguration.PropertiesReader
- Parameters:
line
- the line read from the properties file
-
readProperty
public java.lang.String readProperty() throws java.io.IOException
Description copied from class:PropertiesConfiguration.PropertiesReader
Reads a property line. Returns null if Stream is at EOF. Concatenates lines ending with "\". Skips lines beginning with "#" or "!" and empty lines. The return value is a property definition (<name>
=<value>
)- Overrides:
readProperty
in classPropertiesConfiguration.PropertiesReader
- Returns:
- A string containing a property value or null
- Throws:
java.io.IOException
- in case of an I/O error
-
unescapePropertyValue
protected java.lang.String unescapePropertyValue(java.lang.String value)
Description copied from class:PropertiesConfiguration.PropertiesReader
Performs unescaping on the given property value.- Overrides:
unescapePropertyValue
in classPropertiesConfiguration.PropertiesReader
- Parameters:
value
- the property value- Returns:
- the unescaped property value
-
-