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
APropertiesConfiguration.PropertiesReaderthat tries to mimic the behavior ofProperties.- Since:
- 2.4
-
-
Constructor Summary
Constructors Constructor Description JupPropertiesReader(Reader reader)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidparseProperty(String line)Parses a line read from the properties file.StringreadProperty()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, 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
-
Methods inherited from class java.io.Reader
nullReader, read, read, transferTo
-
-
-
-
Constructor Detail
-
JupPropertiesReader
public JupPropertiesReader(Reader reader)
Constructor.- Parameters:
reader- A Reader.
-
-
Method Detail
-
parseProperty
protected void parseProperty(String line)
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
public String readProperty() throws IOException
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
protected String unescapePropertyValue(String value)
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
-
-