Class StringArrayHandler
java.lang.Object
de.siegmar.fastcsv.reader.CsvCallbackHandler<String[]>
de.siegmar.fastcsv.reader.AbstractCsvCallbackHandler<String[]>
de.siegmar.fastcsv.reader.StringArrayHandler
A
CsvCallbackHandler implementation that returns the fields of each record as an array of Strings.
This implementation is stateful and must not be reused.
-
Field Summary
Fields inherited from class AbstractCsvCallbackHandler
comment, emptyLine, fieldIdx, fieldModifier, fields, recordSize, startingLineNumber -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newStringArrayHandler.StringArrayHandler(FieldModifier fieldModifier) Constructs a newStringArrayHandlerwith the given field modifier. -
Method Summary
Modifier and TypeMethodDescriptionprotected RecordWrapper<String[]> Called at the end of each CSV record to build an object representation of the record.Methods inherited from class AbstractCsvCallbackHandler
addField, addField, beginRecord, buildWrapper, compactFields, materializeComment, materializeField, modifyComment, modifyField, setComment, setCommentMethods inherited from class CsvCallbackHandler
terminate
-
Constructor Details
-
StringArrayHandler
public StringArrayHandler()Constructs a newStringArrayHandler. -
StringArrayHandler
Constructs a newStringArrayHandlerwith the given field modifier.- Parameters:
fieldModifier- the field modifier, must not benull- Throws:
NullPointerException- ifnullis passed
-
-
Method Details
-
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<String[]>- Returns:
- the record wrapper or
nullif the record should be ignored/skipped
-