|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.univocity.parsers.common.ContextWrapper<ParsingContext>
com.univocity.parsers.common.ParsingContextWrapper
public class ParsingContextWrapper
A simple a wrapper for a ParsingContext.
| Field Summary |
|---|
| Fields inherited from class com.univocity.parsers.common.ContextWrapper |
|---|
context |
| Constructor Summary | |
|---|---|
ParsingContextWrapper(ParsingContext context)
Wraps a ParsingContext. |
|
| Method Summary | |
|---|---|
Map<Long,String> |
comments()
Returns all comments collected by the parser so far. |
long |
currentChar()
Returns the index of the last char read from the input so far. |
long |
currentLine()
Returns the current line of text being processed by the parser |
String |
currentParsedContent()
Returns a String with the input character sequence parsed to produce the current record. |
String |
fieldContentOnError()
Returns a String with the input character sequence accumulated on a field before TextParsingException occurred. |
String |
lastComment()
Returns the last comment found in the input. |
char[] |
lineSeparator()
Returns the line separator characters used to separate individual records when parsing. |
String[] |
parsedHeaders()
Returns the headers parsed from the input, if and only if CommonParserSettings.headerExtractionEnabled is true. |
String[] |
selectedHeaders()
|
void |
skipLines(long lines)
Skips a given number of lines from the current position. |
| Methods inherited from class com.univocity.parsers.common.ContextWrapper |
|---|
columnsReordered, currentColumn, currentRecord, extractedFieldIndexes, headers, indexOf, indexOf, isStopped, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.univocity.parsers.common.ParsingContext |
|---|
columnsReordered, extractedFieldIndexes, headers |
| Methods inherited from interface com.univocity.parsers.common.Context |
|---|
currentColumn, currentRecord, indexOf, indexOf, isStopped, stop |
| Constructor Detail |
|---|
public ParsingContextWrapper(ParsingContext context)
ParsingContext.
context - the parsingContext object to be wrapped.| Method Detail |
|---|
public long currentLine()
ParsingContext
currentLine in interface ParsingContextpublic long currentChar()
ParsingContext
currentChar in interface ParsingContextpublic void skipLines(long lines)
ParsingContext
skipLines in interface ParsingContextlines - the number of lines to be skipped.public String currentParsedContent()
ParsingContext
currentParsedContent in interface ParsingContextpublic Map<Long,String> comments()
ParsingContextCommonParserSettings.isCommentCollectionEnabled() evaluates to false.
comments in interface ParsingContextpublic String lastComment()
ParsingContextnull will be returned if CommonParserSettings.isCommentCollectionEnabled() is evaluated to false.
lastComment in interface ParsingContextpublic String[] parsedHeaders()
ParsingContextCommonParserSettings.headerExtractionEnabled is true.
The result of this method won't return the list of headers manually set by the user in CommonSettings.getHeaders().
Use the ParsingContext.headers() method instead to obtain the headers actually used by the parser.
parsedHeaders in interface ParsingContextCommonParserSettings.headerExtractionEnabled is true.public char[] lineSeparator()
ParsingContextFormat.getLineSeparator() configuration, or the line separator sequence
identified automatically when CommonParserSettings.isLineSeparatorDetectionEnabled() evaluates to true.
lineSeparator in interface ParsingContextpublic String fieldContentOnError()
ParsingContextTextParsingException occurred.
fieldContentOnError in interface ParsingContextpublic String[] selectedHeaders()
selectedHeaders in interface ContextselectedHeaders in class ContextWrapper<ParsingContext>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||