Class StringArrayHandler


  • public final class StringArrayHandler
    extends AbstractCsvCallbackHandler<java.lang.String[]>
    A CsvCallbackHandler implementation that returns the fields of each record as an array of Strings.

    This implementation is stateful and must not be reused.

    • Constructor Detail

      • StringArrayHandler

        public StringArrayHandler()
        Constructs a new StringArrayHandler.
      • StringArrayHandler

        public StringArrayHandler​(FieldModifier fieldModifier)
        Constructs a new StringArrayHandler with the given field modifier.
        Parameters:
        fieldModifier - the field modifier, must not be null
        Throws:
        java.lang.NullPointerException - if null is passed
    • Method Detail

      • buildRecord

        protected RecordWrapper<java.lang.String[]> 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 class CsvCallbackHandler<java.lang.String[]>
        Returns:
        the record wrapper or null if the record should be ignored/skipped