Skip to content

Inject ReadProcessor #16

@ritonglue

Description

@ritonglue

It would be interesting to use a customize ReadProcessor and be able to read the full CSVRecord before processing. This is usefull if you have a ragged csv file and you want to skip some lines. A solution is to modify the private method getCSVRecord to
protected T getCSVRecord(CSVRecord record, Map<Integer, CSVReadAnnotationManager> map) throws InstantiationException, IllegalAccessException
and inject its own ReadProcessor to the CSVProcessor. Two solutions :

  • either create a public method getReadProcessor() in CSVProcessor and use it instead of the field readProcessor
  • or inject it via constructor.

The CSVNamedReadProcessor and the CSVOrderReadProcessor must be extendable (they must be public) as one wants to override their getCSVRecord method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions