public abstract class AbstractTableWriter extends java.lang.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 |
writeRow(java.lang.Object... row)
Write a row to the table.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, flush, getLayout, writeRow
public void writeRow(java.lang.Object... row) throws java.io.IOException
Write a row to the table. This method is thread-safe.
This implementation delegates toTableWriter.writeRow(java.util.List)
.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.java.io.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.java.lang.IllegalArgumentException
- if the row is too wide.