org.apache.commons.configuration
Class PropertiesConfiguration.PropertiesReader

java.lang.Object
  extended byjava.io.Reader
      extended byjava.io.BufferedReader
          extended byjava.io.LineNumberReader
              extended byorg.apache.commons.configuration.PropertiesConfiguration.PropertiesReader
Enclosing class:
PropertiesConfiguration

public static class PropertiesConfiguration.PropertiesReader
extends LineNumberReader

This class is used to read properties lines. These lines do not terminate with new-line chars but rather when there is no backslash sign a the end of the line. This is used to concatenate multiple lines for readability.


Field Summary
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
PropertiesConfiguration.PropertiesReader(Reader reader)
          Constructor.
 
Method Summary
 String readProperty()
          Read a property.
 
Methods inherited from class java.io.LineNumberReader
getLineNumber, mark, read, read, readLine, reset, setLineNumber, skip
 
Methods inherited from class java.io.BufferedReader
close, markSupported, ready
 
Methods inherited from class java.io.Reader
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesConfiguration.PropertiesReader

public PropertiesConfiguration.PropertiesReader(Reader reader)
Constructor.

Parameters:
reader - A Reader.
Method Detail

readProperty

public String readProperty()
                    throws IOException
Read a property. Returns null if Stream is at EOF. Concatenates lines ending with "\". Skips lines beginning with "#" and empty lines.

Returns:
A string containing a property value or null
Throws:
IOException


Copyright © 2001-2005 The Apache Software Foundation. All Rights Reserved.