org.apache.commons.configuration
public static class PropertiesConfiguration.PropertiesReader extends LineNumberReader
Field Summary | |
---|---|
List | commentLines Stores the comment lines for the currently processed property. |
char | delimiter Stores the list delimiter character. |
String | propertyName Stores the name of the last read property. |
String | propertyValue Stores the value of the last read property. |
Constructor Summary | |
---|---|
PropertiesReader(Reader reader)
Constructor.
| |
PropertiesReader(Reader reader, char listDelimiter)
Creates a new instance of PropertiesReader and sets
the underlaying reader and the list delimiter.
|
Method Summary | |
---|---|
static boolean | checkCombineLines(String line)
Checks if the passed in line should be combined with the following.
|
List | getCommentLines()
Returns the comment lines that have been read for the last property.
|
String | getPropertyName()
Returns the name of the last read property. |
String | getPropertyValue()
Returns the value of the last read property. |
boolean | nextProperty()
Parses the next property from the input stream and stores the found
name and value in internal fields. |
static String[] | parseProperty(String line)
Parse a property line and return the key and the value in an array.
|
String | readProperty()
Reads a property line. |
Parameters: reader A Reader.
PropertiesReader
and sets
the underlaying reader and the list delimiter.
Parameters: reader the reader listDelimiter the list delimiter character
Since: 1.3
Parameters: line the line
Returns: a flag if the lines should be combined
Returns: the comment lines for the last property returned by
readProperty()
Since: 1.3
nextProperty
was invoked and its
return value was true.
Returns: the name of the last read property
Since: 1.3
nextProperty
was invoked and
its return value was true.
Returns: the value of the last read property
Since: 1.3
Returns: a flag if further properties are available
Throws: IOException if an error occurs
Since: 1.3
Parameters: line the line to parse
Returns: an array with the property's key and value
Since: 1.2
<name>
= <value>
)
Returns: A string containing a property value or null
Throws: IOException in case of an I/O error