CsvCallbackHandler implementations that handles their own field storage and record building.
This implementation is stateful and must not be reused.
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private RecordType | |
| private long |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected final void | addField(final char[] buf, final int offset, final int len, final boolean quoted)
Implements abstract de. Called for each field in the record. |
| protected final void | beginRecord(final long startingLineNumber)
Implements abstract de. Called at the beginning of each record. |
| protected int | Returns: the number of fields in the current record.Implements abstract de. Returns the number of fields in the current record. |
| protected RecordType | getRecordType()
Implements abstract de. Returns the type of the record that is built from the CSV data. |
| protected long | Returns: the starting line number of the current recordThe starting line number of the current record. |
| protected void | handleBegin(final long
the line number where the record starts (starting with 1) startingLineNumber)Handles the beginning of a record. |
| protected void | handleComment(final char[]
the internal buffer that contains the field value (among other data) buf, final int the offset of the field value in the buffer offset, final int the length of the field value len)Handles a comment. |
| protected void | |
| protected void | handleField(final int
the index of the field in the record (starting with 0) fieldIdx, final char[] the internal buffer that contains the field value (among other data) buf, final int the offset of the field value in the buffer offset, final int the length of the field value len, final boolean true if the field was quotedHandles a field. |
| protected final void | setComment(final char[] buf, final int offset, final int len)
Implements abstract de. Called for each comment line. |
| protected final void | setEmpty()
Implements abstract de. Called for each empty line. |
| fieldCount | back to summary |
|---|---|
| private int fieldCount | |
| recordType | back to summary |
|---|---|
| private RecordType recordType | |
| startingLineNumber | back to summary |
|---|---|
| private long startingLineNumber | |
| AbstractBaseCsvCallbackHandler | back to summary |
|---|---|
| protected AbstractBaseCsvCallbackHandler() Constructs a new instance. | |
| addField | back to summary |
|---|---|
| protected final void addField(final char[] buf, final int offset, final int len, final boolean quoted) Implements abstract de. Doc from de. Called for each field in the record. A record can either be a comment or a regular record. If this method is called, the record is a regular record and cannot be a comment. The The This implementation delegates to
| |
| beginRecord | back to summary |
|---|---|
| protected final void beginRecord(final long startingLineNumber) Implements abstract de. Doc from de. Called at the beginning of each record. The
| |
| getFieldCount | back to summary |
|---|---|
| protected int getFieldCount() Implements abstract de. Returns the number of fields in the current record.
| |
| getRecordType | back to summary |
|---|---|
| protected RecordType getRecordType() Implements abstract de. Doc from de. Returns the type of the record that is built from the CSV data. The
| |
| getStartingLineNumber | back to summary |
|---|---|
| protected long getStartingLineNumber() The starting line number of the current record. See
| |
| handleBegin | back to summary |
|---|---|
| protected void handleBegin(final long startingLineNumber) Handles the beginning of a record. This method is called at the beginning of each record.
| |
| handleComment | back to summary |
|---|---|
| protected void handleComment(final char[] buf, final int offset, final int len) Handles a comment. This method is called for each comment line. See
| |
| handleEmpty | back to summary |
|---|---|
| protected void handleEmpty() Handles an empty line. This method is called for each empty line. | |
| handleField | back to summary |
|---|---|
| protected void handleField(final int fieldIdx, final char[] buf, final int offset, final int len, final boolean quoted) Handles a field. This method is called for each field in the record. See
| |
| setComment | back to summary |
|---|---|
| protected final void setComment(final char[] buf, final int offset, final int len) Implements abstract de. Doc from de. Called for each comment line. Note that the comment character is not included in the value. This method is not called if
There can only be one invocation of this method per record. A record can either be a comment or a regular record. If this method is called, the record is a comment and cannot be a regular record. The This implementation delegates to
| |
| setEmpty | back to summary |
|---|---|
| protected final void setEmpty() Implements abstract de. Doc from de. Called for each empty line. This implementation delegates to
| |