Class MavenProperties.PropertiesReader
java.lang.Object
java.io.Reader
java.io.BufferedReader
java.io.LineNumberReader
org.apache.maven.cli.props.MavenProperties.PropertiesReader
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- Readable
- Enclosing class:
- MavenProperties
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
- 
Constructor SummaryConstructorsConstructorDescriptionPropertiesReader(Reader reader, boolean maybeTyped) Creates a new instance ofPropertiesReaderand sets the underlaying reader and the list delimiter.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the comment lines that have been read for the last property.Returns the name of the last read property.Returns the value of the last read property.Returns the value lines that have been read for the last property.booleanParses the next property from the input stream and stores the found name and value in internal fields.Reads a property line.Methods inherited from class java.io.LineNumberReadergetLineNumber, mark, read, read, readLine, reset, setLineNumber, skipMethods inherited from class java.io.BufferedReaderclose, lines, markSupported, readyMethods inherited from class java.io.ReadernullReader, read, read, transferTo
- 
Constructor Details- 
PropertiesReaderCreates a new instance ofPropertiesReaderand sets the underlaying reader and the list delimiter.- Parameters:
- reader- the reader
 
 
- 
- 
Method Details- 
readPropertyReads 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>)- Returns:
- A string containing a property value or null
- Throws:
- IOException- in case of an I/O error
 
- 
nextPropertyParses the next property from the input stream and stores the found name and value in internal fields. These fields can be obtained using the provided getter methods. The return value indicates whether EOF was reached (false) or whether further properties are available (true).- Returns:
- a flag if further properties are available
- Throws:
- IOException- if an error occurs
 
- 
getCommentLines
- 
getValueLines
- 
getPropertyNameReturns the name of the last read property. This method can be called afternextProperty()- Returns:
- the name of the last read property
 
- 
getPropertyValueReturns the value of the last read property. This method can be called afternextProperty()- Returns:
- the value of the last read property
 
 
-