public abstract class AbstractTableWriter extends Object implements TableWriter
Abstract helper class for implementing table writers.
| Constructor and Description |
|---|
AbstractTableWriter() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkRowWidth(int width)
Check the width of a row to see if it is too wide.
|
void |
close()
No-op close implementaiton.
|
void |
writeRow(Object... row)
Write a row to the table.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLayout, writeRowpublic void writeRow(Object... row) throws IOException
Write a row to the table. This method is thread-safe.
This implementation delegates toTableWriter.writeRow(java.util.List).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.IOException - if an error occurs writing the row.protected void checkRowWidth(int width)
Check the width of a row to see if it is too wide. This formats the exception with a helpful error message.
width - The row width.IllegalArgumentException - if the row is too wide.public void close()
throws IOException
No-op close implementaiton.
close in interface Closeableclose in interface AutoCloseableclose in interface TableWriterIOException