Package net.sf.basedb.util.parser
Class FlatFileParser.Line
java.lang.Object
net.sf.basedb.util.parser.FlatFileParser.Line
- Enclosing class:
- FlatFileParser
This class holds data about a line parsed by the
FlatFileParser.parseHeaders()
method.- Version:
- 2.0
- Author:
- Nicklas
- See Also:
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprivate
Create a new header line object.private
Line
(int lineNo, String line, String name, FlatFileParser.LineType type) Create a new section line object.private
Line
(int lineNo, String line, FlatFileParser.LineType type) Create a new line object. -
Method Summary
Modifier and TypeMethodDescriptionline()
The entire line as it was read from the input stream.int
lineNo()
The line number of this line in the input stream.name()
The name of the header if the line is a header line.toString()
type()
The type of the line as determined by theFlatFileParser.parseHeaders()
method.value()
The value of the header if the line is a header line.
-
Field Details
-
lineNo
private final int lineNo -
line
-
type
-
name
-
value
-
-
Constructor Details
-
Line
Create a new line object. -
Line
Create a new section line object. -
Line
Create a new header line object.
-
-
Method Details
-
toString
-
lineNo
public int lineNo()The line number of this line in the input stream.- Returns:
- The line number
-
line
The entire line as it was read from the input stream.- Returns:
- A string
-
type
The type of the line as determined by theFlatFileParser.parseHeaders()
method. The value is one of the values in theFlatFileParser.LineType
enumeration.- Returns:
- A code indicating the type of the line
-
name
The name of the header if the line is a header line.- Returns:
- The name of the header, or null if it isn't a header line
-
value
The value of the header if the line is a header line.- Returns:
- The value of the header, or null if it isn't a header line
-