Add configuration method on DelimiterWriter to provide the hability to choose wether you want column title or not when writing files.
Changes on DelimiterWriter
- void setWriteColumnTitle(boolean) tell wether or not to write column title before first record.
- overwrite addRecordEntry(String columnName, Object value) to set Map capacity according to "columnTitles" size.
Also change some of AbstractWriter:
- boolean AbstractWriter.isFirstRecordWritten() that return true only after the first call to AbstractWriter.nextRecord(). Used to set column title if desired before the first record line.
- void AbstractWriter.setRowMap(Map). Used by DelimiterWriter to ajuste Map capacity when calling addRecordEntry(String , Object ).
Base on FlatPack v3.1.1
Contains unit test
Java src with unit test into a Maven structure