I do know the header, but the header is parsed separately. I am using a pojo with annotations and setting it as type.
My code looks like this:
CsvToBean<MyObject> bb = new CsvToBeanBuilder<MyObject>(reader)
.withSeparator(SEPERATOR)
.withIgnoreLeadingWhiteSpace(true)
.withType(MyObject.class)
.build();
When I iterate, I get MyObject with all null values. MyObject is the pojo with fields annotated with column names.
Is there a way to set headers in opencsv?