Class TextTabularOutput

java.lang.Object
com.complexible.common.dataexporter.TextTabularOutput
All Implemented Interfaces:
LogOutputter

public class TextTabularOutput extends Object implements LogOutputter
Utility class to wrap a DataExporter so column widths can be computed on-the-fly by buffering first 1000 results and inspecting values.
Author:
Evren Sirin*
  • Constructor Details

    • TextTabularOutput

      public TextTabularOutput(OutputStream theOut, String... theColNames)
    • TextTabularOutput

      public TextTabularOutput(OutputStream theOut, com.brsanthu.dataexporter.model.Column... theColumns)
    • TextTabularOutput

      public TextTabularOutput(OutputStream theOut, Iterable<com.brsanthu.dataexporter.model.Column> theColumns)
    • TextTabularOutput

      public TextTabularOutput(com.brsanthu.dataexporter.DataExporter theExporter, Iterable<com.brsanthu.dataexporter.model.Column> theColumns)
  • Method Details

    • output

      public long output()
      Specified by:
      output in interface LogOutputter
    • addRow

      public void addRow(Object... theRow)
      Specified by:
      addRow in interface LogOutputter
    • getPrefetchLimit

      public int getPrefetchLimit()
    • setPrefetchLimit

      public void setPrefetchLimit(int thePrefetchLimit)
      Specified by:
      setPrefetchLimit in interface LogOutputter
    • getMinColWidth

      public int getMinColWidth()
      Returns the minimum column width.
    • setMinColWidth

      public void setMinColWidth(int theMinColWidth)
      Sets the minimum column width.
    • getMaxColWidth

      public int getMaxColWidth()
      Returns the maximum column width.
    • setMaxColWidth

      public void setMaxColWidth(int theMaxColWidth)
      Sets the maximum column width.
    • getColumn

      public com.brsanthu.dataexporter.model.Column getColumn(int index)
    • getColumns

      public List<com.brsanthu.dataexporter.model.Column> getColumns()