RowProcessor.
The ParsingContext can be used to control and to obtain information about the parsing process.
RowProcessor, DefaultParsingContext
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the parsed records are being reordered by the parser, false otherwiseRedeclares com. CommonSettings#selectFields and friends) are being reordered.
|
| public Map | Returns: a map containing the line numbers and comments found in each.Returns all comments collected by the parser so far. |
| public long | Returns: the index of the last char read from the input so far.Returns the index of the last char read from the input so far. |
| public long | Returns: current line of text being processed by the parserReturns the current line of text being processed by the parser |
| public String | Returns: the text content parsed for the current input record.Returns a String with the input character sequence parsed to produce the current record. |
| public int | Returns: the length of the text content parsed for the current input recordReturns the length of the character sequence parsed to produce the current record. |
| public int[] | Returns: The indexes of each selected field; null if no fields were selected.Redeclares com. CommonSettings#selectFields and friends).
|
| public String | Returns: the text content parsed for the current field of the current input record at the time of the error.Returns a String with the input character sequence accumulated on a field before |
| public String[] | Returns: the headers used to identify each record parsed from the input.Redeclares com. |
| public String | Returns: the last comment found in the input.Returns the last comment found in the input. |
| public char[] | Returns: the line separator sequence. Might contain one or two characters.Returns the line separator characters used to separate individual records when parsing. |
| public String[] | Returns: the headers parsed from the input, whenCommonParserSettings#headerExtractionEnabled is true.Returns the headers parsed from the input, if and only if |
| public void | skipLines(long
the number of lines to be skipped. lines)Skips a given number of lines from the current position. |
| columnsReordered | back to summary |
|---|---|
| public boolean columnsReordered() Redeclares com. Indicates whether selected fields (using If columns are reordered, each parsed record will contain values only for the selected fields, as specified by
| |
| comments | back to summary |
|---|---|
| public Map Returns all comments collected by the parser so far.
An empty map will be returned if | |
| currentChar | back to summary |
|---|---|
| public long currentChar() Returns the index of the last char read from the input so far.
| |
| currentLine | back to summary |
|---|---|
| public long currentLine() Returns the current line of text being processed by the parser
| |
| currentParsedContent | back to summary |
|---|---|
| public String currentParsedContent() Returns a String with the input character sequence parsed to produce the current record.
| |
| currentParsedContentLength | back to summary |
|---|---|
| public int currentParsedContentLength() Returns the length of the character sequence parsed to produce the current record.
| |
| extractedFieldIndexes | back to summary |
|---|---|
| public int[] extractedFieldIndexes() Redeclares com. Returns the indexes of each field extracted from the input when fields are selected in the parser settings (i.e. using The indexes are relative to their original position in the input. For example, if the input has the fields "A, B, C, D", and the selected fields are "A, D", then the extracted field indexes will return [0, 3] If no fields were selected, then this method will return null. This means all fields are being parsed.
| |
| fieldContentOnError | back to summary |
|---|---|
| public String fieldContentOnError() Returns a String with the input character sequence accumulated on a field before
| |
| headers | back to summary |
|---|---|
| public String[] headers() Redeclares com. Returns the file headers that identify each parsed record. If the headers are extracted from the input (i.e. If no headers are extracted from the input, then the configured headers in
| |
| lastComment | back to summary |
|---|---|
| public String lastComment() Returns the last comment found in the input.
| |
| lineSeparator | back to summary |
|---|---|
| public char[] lineSeparator() Returns the line separator characters used to separate individual records when parsing. This could be the line
separator defined in the
| |
| parsedHeaders | back to summary |
|---|---|
| public String[] parsedHeaders() Returns the headers parsed from the input, if and only if
| |
| skipLines | back to summary |
|---|---|
| public void skipLines(long lines) Skips a given number of lines from the current position.
| |