|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.univocity.parsers.common.AbstractParser<TsvParserSettings>
com.univocity.parsers.tsv.TsvParser
public class TsvParser
A very fast TSV parser implementation.
TsvFormat,
TsvParserSettings,
TsvWriter,
AbstractParser| Field Summary |
|---|
| Fields inherited from class com.univocity.parsers.common.AbstractParser |
|---|
ch, comments, context, input, lastComment, output, processor, recordFactory, settings |
| Constructor Summary | |
|---|---|
TsvParser(TsvParserSettings settings)
The TsvParser supports all settings provided by TsvParserSettings, and requires this configuration to be properly initialized. |
|
| Method Summary | |
|---|---|
protected void |
initialize()
|
protected void |
parseRecord()
Parser-specific implementation for reading a single record from the input. |
| Methods inherited from class com.univocity.parsers.common.AbstractParser |
|---|
beginParsing, beginParsing, beginParsing, beginParsing, beginParsing, beginParsing, beginParsing, consumeValueOnEOF, createParsingContext, getContext, getInputAnalysisProcess, getRecordMetadata, inComment, parse, parse, parse, parse, parse, parse, parse, parseAll, parseAll, parseAll, parseAll, parseAll, parseAll, parseAll, parseAllRecords, parseAllRecords, parseAllRecords, parseAllRecords, parseAllRecords, parseAllRecords, parseAllRecords, parseLine, parseNext, parseNextRecord, parseRecord, processComment, reloadHeaders, stopParsing |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TsvParser(TsvParserSettings settings)
TsvParserSettings, and requires this configuration to be properly initialized.
settings - the parser configuration| Method Detail |
|---|
protected void initialize()
initialize in class AbstractParser<TsvParserSettings>protected void parseRecord()
The AbstractParser handles the initialization and processing of the input until it is ready to be parsed.
It then delegates the input to the parser-specific implementation defined by AbstractParser.parseRecord(). In general, an implementation of AbstractParser.parseRecord() will perform the following steps:
CharAppender) so the next call to output.appender.append(ch) will be store the character of the next parsed value Once the AbstractParser.parseRecord() returns, the AbstractParser takes over and handles the information (generally, reorganizing it and passing it on to a RowProcessor).
After the record processing, the AbstractParser reads the next characters from the input, delegating control again to the parseRecord() implementation for processing of the next record.
This cycle repeats until the reading process is stopped by the user, the input is exhausted, or an error happens.
In case of errors, the unchecked exception TextParsingException will be thrown and all resources in use will be closed automatically. The exception should contain the cause and more information about where in the input the error happened.
parseRecord in class AbstractParser<TsvParserSettings>CharInputReader,
CharAppender,
ParserOutput,
TextParsingException,
RowProcessor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||