You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Not a bad idea to allow for that level of extensibility. If that were to be added I would want that to be a first class implementation instead of possible workaround just incase the inner class methods get moved around or renamed.
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
toprotected T getCSVRecord(CSVRecord record, Map<Integer, CSVReadAnnotationManager> map) throws InstantiationException, IllegalAccessException
and inject its own ReadProcessor to the CSVProcessor. Two solutions :
getReadProcessor()
in CSVProcessor and use it instead of the fieldreadProcessor
The
CSVNamedReadProcessor
and theCSVOrderReadProcessor
must be extendable (they must be public) as one wants to override theirgetCSVRecord
method.The text was updated successfully, but these errors were encountered: