public class MultiplexedTableWriter extends Object implements TableWriter
Constructor and Description |
---|
MultiplexedTableWriter(TableLayout layout,
List<TableWriter> writers) |
MultiplexedTableWriter(TableLayout layout,
TableWriter... writers) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Finish the table.
|
TableLayout |
getLayout()
Get the layout of this table.
|
void |
writeRow(List<?> row)
Write a row to the table.
|
void |
writeRow(Object... row)
Write a row to the table.
|
public MultiplexedTableWriter(TableLayout layout, List<TableWriter> writers)
public MultiplexedTableWriter(TableLayout layout, TableWriter... writers)
public TableLayout getLayout()
TableWriter
Get the layout of this table.
getLayout
in interface TableWriter
public void writeRow(Object... row) throws IOException
TableWriter
Write a row to the table. This method is thread-safe.
writeRow
in interface TableWriter
row
- A row of values. If the table requires more columns, the remaining columns are empty. The row is copied if necessary; the caller is free to re-use the same array for returnValue calls.IOException
- if an error occurs writing the row.public void writeRow(List<?> row) throws IOException
TableWriter
Write a row to the table. This method is thread-safe.
writeRow
in interface TableWriter
row
- A row of values. If the table requires more columns, the remaining columns are empty. The row is copied if necessary; the caller is free to re-use the same array for returnValue calls.IOException
- if an error occurs writing the row.public void close() throws IOException
TableWriter
Finish the table. Depending on how it was constructed, some underlying resource may be closed.
close
in interface Closeable
close
in interface AutoCloseable
close
in interface TableWriter
IOException