Top Description Methods
com.opencsv.processor

public Interface RowProcessor


This is the interface for processors for an array of Strings read by the com.opencsv.CSVReader before they are validated.

This should only be used if you have a very good understanding and full control of the data being processed or something you want applied to every column in the row.

WARNING - using a processor can change the string in ways that could make it impossible to be processed or make it into a different format than what you are expecting based on the settings of the parser and reader. So great care must be taken when creating and using a RowProcessor.

NOTE - Because of the potential problems a bad processor can cause we will close down any bug reports created for opencsv where a RowProcessor is involved with the recommendation they be reopened as a support request.

Author
Scott Conway
Since
5.0

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The processed String
processColumnItem
(String
String to be processed
column
)

Method that contains the code that will transform a single column/element.

public void
processRow(String[]
Array of Strings to be processed
row
)

Method that will process the entire row.

Method Detail

processColumnItemback to summary
public String processColumnItem(String column)

Method that contains the code that will transform a single column/element. While not called directly by opencsv it is in the interface to provide an easy way to test if the processor is functioning properly.

Parameters
column:String

String to be processed

Returns:String

The processed String

processRowback to summary
public void processRow(String[] row)

Method that will process the entire row.

Parameters
row:String[]

Array of Strings to be processed