Package com.powsybl.commons.io.table
Class CsvTableFormatter
- java.lang.Object
-
- com.powsybl.commons.io.table.AbstractTableFormatter
-
- com.powsybl.commons.io.table.CsvTableFormatter
-
- All Implemented Interfaces:
TableFormatter
,AutoCloseable
- Direct Known Subclasses:
AmplDatTableFormatter
public class CsvTableFormatter extends AbstractTableFormatter
- Author:
- Geoffroy Jamgotchian
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
headerDone
protected String
title
-
Fields inherited from class com.powsybl.commons.io.table.AbstractTableFormatter
column, columns, config, writer
-
-
Constructor Summary
Constructors Constructor Description CsvTableFormatter(Writer writer, String title, char separator, String invalidString, boolean writeHeader, boolean writeTitle, Locale locale, Column... columns)
CsvTableFormatter(Writer writer, String title, char separator, String invalidString, boolean writeHeader, Locale locale, Column... columns)
CsvTableFormatter(Writer writer, String title, TableFormatterConfig config, Column... columns)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
protected TableFormatter
write(String value)
TableFormatter
writeComment(String comment)
protected void
writeHeader()
-
Methods inherited from class com.powsybl.commons.io.table.AbstractTableFormatter
writeCell, writeCell, writeCell, writeCell, writeCell, writeCell, writeEmptyCell, writeEmptyCells, writeEmptyLine, writeEmptyLines
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.powsybl.commons.io.table.TableFormatter
writeCell
-
-
-
-
Field Detail
-
title
protected final String title
-
headerDone
protected boolean headerDone
-
-
Constructor Detail
-
CsvTableFormatter
public CsvTableFormatter(Writer writer, String title, TableFormatterConfig config, Column... columns)
-
CsvTableFormatter
public CsvTableFormatter(Writer writer, String title, char separator, String invalidString, boolean writeHeader, Locale locale, Column... columns)
-
-
Method Detail
-
writeHeader
protected void writeHeader() throws IOException
- Throws:
IOException
-
writeComment
public TableFormatter writeComment(String comment) throws IOException
- Throws:
IOException
-
write
protected TableFormatter write(String value) throws IOException
- Specified by:
write
in classAbstractTableFormatter
- Throws:
IOException
-
close
public void close() throws IOException
- Throws:
IOException
-
-