use of com.univocity.parsers.fixed.FixedWidthWriter in project powsybl-core by powsybl.
the class IeeeCdfWriter method writeRecords.
private static <T> void writeRecords(Writer writer, List<T> beans, Class<T> aClass) {
FixedWidthWriterSettings settings = new FixedWidthWriterSettings();
settings.setWriteLineSeparatorAfterRecord(true);
BeanWriterProcessor<T> processor = new BeanWriterProcessor<>(aClass);
settings.setRowWriterProcessor(processor);
new FixedWidthWriter(writer, settings).processRecords(beans);
}
Aggregations