ParsingContext implementation used internally by AbstractParser to expose information about a parsing process in execution.
com.univocity.parsers.common.ParsingContext , com.univocity.parsers.common.AbstractParser , com.univocity.parsers.common.processor.RowProcessor
| Modifier and Type | Field and Description |
|---|---|
| private final CharInputReader | |
| private final AbstractParser |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Map | comments()
Implements com. |
| public long | currentChar()
Implements com. |
| public long | currentLine()
Implements com. |
| public String | currentParsedContent()
Implements com. |
| public int | currentParsedContentLength()
Implements com. |
| public String | fieldContentOnError()
Implements com. TextParsingException occurred.
|
| public String | lastComment()
Implements com. |
| public char[] | lineSeparator()
Implements com. |
| public String[] | parsedHeaders()
Implements com. CommonParserSettings#headerExtractionEnabled is true.
|
| public void | skipLines(long
the number of lines to be skipped. lines)Implements com. |
| input | back to summary |
|---|---|
| private final CharInputReader input | |
| parser | back to summary |
|---|---|
| private final AbstractParser<?> parser | |
| DefaultParsingContext | back to summary |
|---|---|
| public DefaultParsingContext(AbstractParser<?> parser, int errorContentLength) | |
| comments | back to summary |
|---|---|
| public Map Implements com. Doc from com. Returns all comments collected by the parser so far.
An empty map will be returned if | |
| currentChar | back to summary |
|---|---|
| public long currentChar() Implements com. Doc from com. Returns the index of the last char read from the input so far.
| |
| currentLine | back to summary |
|---|---|
| public long currentLine() Implements com. Doc from com. Returns the current line of text being processed by the parser
| |
| currentParsedContent | back to summary |
|---|---|
| public String currentParsedContent() Implements com. Doc from com. Returns a String with the input character sequence parsed to produce the current record. | |
| currentParsedContentLength | back to summary |
|---|---|
| public int currentParsedContentLength() Implements com. Doc from com. Returns the length of the character sequence parsed to produce the current record.
| |
| fieldContentOnError | back to summary |
|---|---|
| public String fieldContentOnError() Implements com. Doc from com. Returns a String with the input character sequence accumulated on a field before | |
| lastComment | back to summary |
|---|---|
| public String lastComment() Implements com. Doc from com. Returns the last comment found in the input.
| |
| lineSeparator | back to summary |
|---|---|
| public char[] lineSeparator() Implements com. Doc from com. 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() Implements com. Doc from com. Returns the headers parsed from the input, if and only if
| |
| skipLines | back to summary |
|---|---|
| public void skipLines(long lines) Implements com. Doc from com. Skips a given number of lines from the current position.
| |