- java.lang.Object
-
- de.siegmar.fastcsv.reader.CsvCallbackHandler<T>
-
- de.siegmar.fastcsv.reader.AbstractCsvCallbackHandler<CsvRecord>
-
- de.siegmar.fastcsv.reader.CsvRecordHandler
-
public final class CsvRecordHandler extends AbstractCsvCallbackHandler<CsvRecord>
ACsvCallbackHandler
implementation that returns aCsvRecord
for each record.This implementation is stateful and must not be reused.
-
-
Field Summary
-
Fields inherited from class de.siegmar.fastcsv.reader.AbstractCsvCallbackHandler
comment, emptyLine, fieldIdx, fieldModifier, fields, recordSize, startingLineNumber
-
-
Constructor Summary
Constructors Constructor Description CsvRecordHandler()
Constructs a newCsvRecordHandler
.CsvRecordHandler(FieldModifier fieldModifier)
Constructs a newCsvRecordHandler
with the given field modifier.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RecordWrapper<CsvRecord>
buildRecord()
Called at the end of each CSV record to build an object representation of the record.-
Methods inherited from class de.siegmar.fastcsv.reader.AbstractCsvCallbackHandler
addField, addField, beginRecord, buildWrapper, compactFields, materializeComment, materializeField, modifyComment, modifyField, setComment, setComment
-
Methods inherited from class de.siegmar.fastcsv.reader.CsvCallbackHandler
terminate
-
-
-
-
Constructor Detail
-
CsvRecordHandler
public CsvRecordHandler()
Constructs a newCsvRecordHandler
.
-
CsvRecordHandler
public CsvRecordHandler(FieldModifier fieldModifier)
Constructs a newCsvRecordHandler
with the given field modifier.- Parameters:
fieldModifier
- the field modifier, must not benull
- Throws:
java.lang.NullPointerException
- ifnull
is passed
-
-
Method Detail
-
buildRecord
protected RecordWrapper<CsvRecord> buildRecord()
Description copied from class:CsvCallbackHandler
Called at the end of each CSV record to build an object representation of the record.The returned wrapper is used by the
CsvReader
in order to determine how to process the record.- Specified by:
buildRecord
in classCsvCallbackHandler<CsvRecord>
- Returns:
- the record wrapper or
null
if the record should be ignored/skipped
-
-