DefaultLineMapper<FieldSet> lineMapper = new DefaultLineMapper<FieldSet>();
lineMapper.setLineTokenizer(new DelimitedLineTokenizer());
lineMapper.setFieldSetMapper(new PassThroughFieldSetMapper());
reader.setLinesToSkip(1);
final List<String> headers = new ArrayList<String>();
reader.setSkippedLinesCallback(new LineCallbackHandler() {
public void handleLine(String line) {
headers.add(line);
}
});
reader.setLineMapper(lineMapper);