public class DevNullTableWriter extends java.lang.Object implements TableWriter
Table writer that discards all data.
| Constructor and Description |
|---|
DevNullTableWriter(TableLayout tl) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Finish the table.
|
void |
flush()
Flush the writer, causing all currently-written rows to be flushed to output.
|
TableLayout |
getLayout()
Get the layout of this table.
|
void |
writeRow(java.util.List<?> row)
Write a row to the table.
|
void |
writeRow(java.lang.Object... row)
Write a row to the table.
|
public DevNullTableWriter(TableLayout tl)
public TableLayout getLayout()
TableWriterGet the layout of this table.
getLayout in interface TableWriterpublic void writeRow(java.lang.Object... row)
throws java.io.IOException
TableWriterWrite a row to the table. This method is thread-safe.
writeRow in interface TableWriterrow - 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.java.io.IOException - if an error occurs writing the row.public void writeRow(java.util.List<?> row)
throws java.io.IOException
TableWriterWrite a row to the table. This method is thread-safe.
writeRow in interface TableWriterrow - 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.java.io.IOException - if an error occurs writing the row.public void flush()
throws java.io.IOException
TableWriterFlush the writer, causing all currently-written rows to be flushed to output.
flush in interface TableWriterjava.io.IOException - if an error occurs while flushing output.public void close()
throws java.io.IOException
TableWriterFinish the table. Depending on how it was constructed, some underlying resource may be closed.
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface TableWriterjava.io.IOException