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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidparseProperty(String line) Parses a line read from the properties file.Reads a property line.protected StringunescapePropertyValue(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, unescapePropertyNameMethods inherited from class java.io.LineNumberReader
getLineNumber, mark, read, read, readLine, reset, setLineNumber, skipMethods 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.PropertiesReaderParses 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:
parsePropertyin classPropertiesConfiguration.PropertiesReader- Parameters:
line- the line read from the properties file
-
readProperty
Description copied from class:PropertiesConfiguration.PropertiesReaderReads 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:
readPropertyin 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.PropertiesReaderPerforms unescaping on the given property value.- Overrides:
unescapePropertyValuein classPropertiesConfiguration.PropertiesReader- Parameters:
value- the property value- Returns:
- the unescaped property value
-