According to this message about SuperCSV capabilities , can SuperCSV handle header values ( only column names ) read from the database?
For example, the following code snippet describes the current state and expected state.
Current state
INPUT
final String[] header = new String[] { "firstName", "lastName", "birthDate"};
beanWriter.writeHeader(header);
for( final CustomerBean customer : customers ) {
beanWriter.write(customer, header, processors);
}
OUTPUT : file with column names:
firstName, lastName, birthDate
Bob , Doe , 02/12/2013
Expected condition
INPUT :
final String[] header = new String[] { "firstName", "lastName", "birthDate"};
beanWriter.writeHeader(header);
for( final CustomerBean customer : customers ) {
beanWriter.write(customer, header, processors);
}
??????
OUTPUT : file with changed column names:
First Name, Last Name, Birthday
Bob , Doe , 02/12/2013
Any help is greatly appreciated.
todun source
share