|
||||||||||
| 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
com.univocity.parsers.common.ParsingContextSnapshot
public class ParsingContextSnapshot
A snapshot of a ParsingContext which retains copies of variable attributes of a given ParsingContext to
store the state of the parsing process at a given point in time. All runtime operations such as ContextWrapper.stop()
will still work and affect the current parsing process.
| Field Summary |
|---|
| Fields inherited from class com.univocity.parsers.common.ContextWrapper |
|---|
context |
| Constructor Summary | |
|---|---|
ParsingContextSnapshot(ParsingContext context)
Creates a snapshot of a given Context |
|
| 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. |
int |
currentColumn()
Returns the column index of the record being processed. |
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. |
long |
currentRecord()
Returns the index of the last valid record parsed from the input |
String |
lastComment()
Returns the last comment found in the input. |
| Methods inherited from class com.univocity.parsers.common.ParsingContextWrapper |
|---|
fieldContentOnError, lineSeparator, parsedHeaders, selectedHeaders, skipLines |
| Methods inherited from class com.univocity.parsers.common.ContextWrapper |
|---|
columnsReordered, 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 |
|---|
indexOf, indexOf, isStopped, stop |
| Constructor Detail |
|---|
public ParsingContextSnapshot(ParsingContext context)
Context
context - the context object whose variable attributes will be copied over.| Method Detail |
|---|
public long currentLine()
ParsingContext
currentLine in interface ParsingContextcurrentLine in class ParsingContextWrapperpublic long currentChar()
ParsingContext
currentChar in interface ParsingContextcurrentChar in class ParsingContextWrapperpublic Map<Long,String> comments()
ParsingContextCommonParserSettings.isCommentCollectionEnabled() evaluates to false.
comments in interface ParsingContextcomments in class ParsingContextWrapperpublic String lastComment()
ParsingContextnull will be returned if CommonParserSettings.isCommentCollectionEnabled() is evaluated to false.
lastComment in interface ParsingContextlastComment in class ParsingContextWrapperpublic int currentColumn()
Context
currentColumn in interface ContextcurrentColumn in class ContextWrapper<ParsingContext>public String currentParsedContent()
ParsingContext
currentParsedContent in interface ParsingContextcurrentParsedContent in class ParsingContextWrapperpublic long currentRecord()
Context
currentRecord in interface ContextcurrentRecord in class ContextWrapper<ParsingContext>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||