public class ParsingContextSnapshot extends ParsingContextWrapper
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.context| Constructor and Description |
|---|
ParsingContextSnapshot(ParsingContext context)
Creates a snapshot of a given
Context |
| Modifier and Type | Method and Description |
|---|---|
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.
|
currentParsedContentLength, fieldContentOnError, lineSeparator, parsedHeaders, selectedHeaders, skipLines, toRecordcolumnsReordered, errorContentLength, extractedFieldIndexes, headers, indexOf, indexOf, isStopped, recordMetaData, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcolumnsReordered, extractedFieldIndexes, headerserrorContentLength, indexOf, indexOf, isStopped, recordMetaData, stoppublic ParsingContextSnapshot(ParsingContext context)
Contextcontext - the context object whose variable attributes will be copied over.public long currentLine()
ParsingContextcurrentLine in interface ParsingContextcurrentLine in class ParsingContextWrapperpublic long currentChar()
ParsingContextcurrentChar 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()
ContextcurrentColumn in interface ContextcurrentColumn in class ContextWrapper<ParsingContext>public String currentParsedContent()
ParsingContextcurrentParsedContent in interface ParsingContextcurrentParsedContent in class ParsingContextWrapperpublic long currentRecord()
ContextcurrentRecord in interface ContextcurrentRecord in class ContextWrapper<ParsingContext>Copyright © 2021 Univocity Software Pty Ltd. All rights reserved.