| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private final CsvCallbackHandler | |
| private final char | |
| private final CommentStrategy | |
| private final StrictCsvParser. | |
| private boolean | |
| private boolean | |
| private final char | |
| private int | |
| private final char | |
| private long | |
| private int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| pack-priv | StrictCsvParser(final char fieldSeparator, final char quoteCharacter, final CommentStrategy commentStrategy, final char commentCharacter, final boolean allowExtraCharsAfterClosingQuote, final CsvCallbackHandler<?> callbackHandler, final int maxBufferSize, final Reader reader)
|
| pack-priv | StrictCsvParser(final char fieldSeparator, final char quoteCharacter, final CommentStrategy commentStrategy, final char commentCharacter, final boolean allowExtraCharsAfterClosingQuote, final CsvCallbackHandler<?> callbackHandler, final String data)
|
| Modifier and Type | Method and Description |
|---|---|
| private static void | assertFields(final char fieldSeparator, final char quoteCharacter, final char commentCharacter, final CommentStrategy commentStrategy)
|
| private static int | Returns: the length of the field data after removing escapesthe buffer containing the field data buf, final int the start position of the field data (after the opening quote) begin, final int the end position of the field data (on the closing quote / end of buffer) end, final char the quote character quoteCharacter)Remove escapes from the field data. |
| public void | close()
Implements java. Closes this stream and releases any system resources associated with it. |
| pack-priv boolean | |
| public long | getStartingLineNumber()
Implements de. Returns the starting line number of the last parsed record. |
| private void | materialize(final char[] lBuf, final int lBegin, final int lPos, final int lStatus, final char quoteCharacter)
|
| public boolean | parse()
Implements de. Parses the next record from the stream and passes it to the callback handler. |
| public String | peekLine()
Implements de. Returns the next line from the stream without consuming it. |
| private boolean | |
| public void | reset(final long startingLineNumber)
Implements de. Resets the parser to the specified starting line number. |
| public void | skipLine(final int numCharsToSkip)
Implements de. Skips a line in the stream after skipping the specified number of characters. |
| allowExtraCharsAfterClosingQuote | back to summary |
|---|---|
| private final boolean allowExtraCharsAfterClosingQuote | |
| callbackHandler | back to summary |
|---|---|
| private final CsvCallbackHandler<?> callbackHandler | |
| cChar | back to summary |
|---|---|
| private final char cChar | |
| cStrat | back to summary |
|---|---|
| private final CommentStrategy cStrat | |
| csvBuffer | back to summary |
|---|---|
| private final StrictCsvParser. | |
| finished | back to summary |
|---|---|
| private boolean finished | |
| firstField | back to summary |
|---|---|
| private boolean firstField | |
| fsep | back to summary |
|---|---|
| private final char fsep | |
| lines | back to summary |
|---|---|
| private int lines | |
| qChar | back to summary |
|---|---|
| private final char qChar | |
| startingLineNumber | back to summary |
|---|---|
| private long startingLineNumber | |
| status | back to summary |
|---|---|
| private int status | |
| STATUS_COMMENTED_RECORD | back to summary |
|---|---|
| private static final int STATUS_COMMENTED_RECORD | |
| STATUS_DATA_FIELD | back to summary |
|---|---|
| private static final int STATUS_DATA_FIELD | |
| STATUS_LAST_CHAR_WAS_CR | back to summary |
|---|---|
| private static final int STATUS_LAST_CHAR_WAS_CR | |
| STATUS_NEW_FIELD | back to summary |
|---|---|
| private static final int STATUS_NEW_FIELD | |
| STATUS_QUOTED_FIELD | back to summary |
|---|---|
| private static final int STATUS_QUOTED_FIELD | |
| STATUS_QUOTED_MODE | back to summary |
|---|---|
| private static final int STATUS_QUOTED_MODE | |
| STATUS_RESET | back to summary |
|---|---|
| private static final int STATUS_RESET | |
| StrictCsvParser | back to summary |
|---|---|
pack-priv StrictCsvParser(final char fieldSeparator, final char quoteCharacter, final CommentStrategy commentStrategy, final char commentCharacter, final boolean allowExtraCharsAfterClosingQuote, final CsvCallbackHandler<?> callbackHandler, final int maxBufferSize, final Reader reader)
| |
| StrictCsvParser | back to summary |
|---|---|
| pack-priv StrictCsvParser(final char fieldSeparator, final char quoteCharacter, final CommentStrategy commentStrategy, final char commentCharacter, final boolean allowExtraCharsAfterClosingQuote, final CsvCallbackHandler<?> callbackHandler, final String data) | |
| assertFields | back to summary |
|---|---|
| private static void assertFields(final char fieldSeparator, final char quoteCharacter, final char commentCharacter, final CommentStrategy commentStrategy) | |
| cleanDelimiters | back to summary |
|---|---|
| private static int cleanDelimiters(final char[] buf, final int begin, final int end, final char quoteCharacter) Remove escapes from the field data. The input buffer could look like this:
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| consume | back to summary |
|---|---|
pack-priv boolean consume(final char[] lBuf, final int lLen)
| |
| getStartingLineNumber | back to summary |
|---|---|
| public long getStartingLineNumber() Implements de. Doc from de. Returns the starting line number of the last parsed record.
| |
| materialize | back to summary |
|---|---|
| private void materialize(final char[] lBuf, final int lBegin, final int lPos, final int lStatus, final char quoteCharacter) | |
| parse | back to summary |
|---|---|
| public boolean parse() throws IOException Implements de. Doc from de. Parses the next record from the stream and passes it to the callback handler.
| |
| peekLine | back to summary |
|---|---|
| public String peekLine() throws IOException Implements de. Doc from de. Returns the next line from the stream without consuming it.
| |
| processBufferTail | back to summary |
|---|---|
| private boolean processBufferTail() | |
| reset | back to summary |
|---|---|
| public void reset(final long startingLineNumber) Implements de. Doc from de. Resets the parser to the specified starting line number.
| |
| skipLine | back to summary |
|---|---|
| public void skipLine(final int numCharsToSkip) throws IOException Implements de. Doc from de. Skips a line in the stream after skipping the specified number of characters.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | |
| pack-priv char[] | |
| private static final int | |
| pack-priv int | |
| private final int | |
| pack-priv int | |
| private final Reader | |
| private final int |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements java. Closes this stream and releases any system resources associated with it. |
| private boolean | Returns: true, if data was fetched, false if the end of the stream was reachedReads data from the underlying reader and manages the local buffer. |
| private char[] | |
| private void |
| begin | back to summary |
|---|---|
| pack-priv int begin | |
| buf | back to summary |
|---|---|
| pack-priv char[] buf | |
| DEFAULT_READ_SIZE | back to summary |
|---|---|
| private static final int DEFAULT_READ_SIZE | |
| len | back to summary |
|---|---|
| pack-priv int len | |
| maxBufferSize | back to summary |
|---|---|
| private final int maxBufferSize | |
| pos | back to summary |
|---|---|
| pack-priv int pos | |
| reader | back to summary |
|---|---|
| private final Reader reader
| |
| readSize | back to summary |
|---|---|
| private final int readSize | |
| CsvBuffer | back to summary |
|---|---|
| pack-priv CsvBuffer(final Reader reader, final int maxBufferSize) | |
| CsvBuffer | back to summary |
|---|---|
| pack-priv CsvBuffer(final String data) | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| fetchData | back to summary |
|---|---|
| private boolean fetchData() throws IOException Reads data from the underlying reader and manages the local buffer.
| |
| largerBuffer | back to summary |
|---|---|
| private char[] largerBuffer() | |
| reset | back to summary |
|---|---|
| private void reset() | |