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:
Closeable
,AutoCloseable
,Readable
- Enclosing class:
- PropertiesConfiguration
public static class PropertiesConfiguration.JupPropertiesReader
extends PropertiesConfiguration.PropertiesReader
A
PropertiesConfiguration.PropertiesReader
that tries to mimic the behavior of Properties
.- Since:
- 2.4
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
parseProperty
(String line) Parses a line read from the properties file.Reads a property line.protected String
unescapePropertyValue
(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
Methods inherited from class java.io.LineNumberReader
getLineNumber, mark, read, read, readLine, reset, setLineNumber, skip
Methods inherited from class java.io.BufferedReader
close, lines, markSupported, ready
-
Constructor Details
-
JupPropertiesReader
Constructs a new instance.- Parameters:
reader
- A Reader.
-
-
Method Details
-
parseProperty
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
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:
IOException
- in case of an I/O error
-
unescapePropertyValue
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
-