- 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>
ACsvCallbackHandlerimplementation that returns aCsvRecordfor 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 newCsvRecordHandlerwith 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 newCsvRecordHandlerwith the given field modifier.- Parameters:
fieldModifier- the field modifier, must not benull- Throws:
java.lang.NullPointerException- ifnullis passed
-
-
Method Detail
-
buildRecord
protected RecordWrapper<CsvRecord> buildRecord()
Description copied from class:CsvCallbackHandlerCalled at the end of each CSV record to build an object representation of the record.The returned wrapper is used by the
CsvReaderin order to determine how to process the record.- Specified by:
buildRecordin classCsvCallbackHandler<CsvRecord>- Returns:
- the record wrapper or
nullif the record should be ignored/skipped
-
-