Class StringArrayHandler


public final class StringArrayHandler extends AbstractCsvCallbackHandler<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 Details

    • 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:
      NullPointerException - if null is passed
  • Method Details

    • buildRecord

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