Package moss

Class TableWriter

All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable
Direct Known Subclasses:
GraphWriter

public class TableWriter extends BufferedWriter
Class for writers for simple table formats for graph data sets.
Since:
2007.03.04
  • Field Details

    • recsep

      protected char recsep
      the record separator
    • fldsep

      protected char fldsep
      the field separator
  • Constructor Details

    • TableWriter

      public TableWriter(Writer writer)
      Create a simple table format writer.
      Parameters:
      writer - the writer to write to
      Since:
      2007.03.04 (Christian Borgelt)
  • Method Details

    • setChars

      public void setChars(char recsep, char fldsep)
      Set the record and field separators.
      Parameters:
      recsep - the record separator
      fldsep - the field separator
      Since:
      2007.06.26 (Christian Borgelt)
    • writeField

      public void writeField(String field, boolean last) throws IOException
      Write a field (string).
      Parameters:
      field - the field to write
      last - whether this is the last field in a record
      Throws:
      IOException - if writing the field failed
      Since:
      2020.10.23 (Christian Borgelt)
    • writeField

      public void writeField(int field, boolean last) throws IOException
      Write a field (int).
      Parameters:
      field - the field to write
      last - whether this is the last field in a record
      Throws:
      IOException - if writing the field failed
      Since:
      2020.10.23 (Christian Borgelt)
    • writeField

      public void writeField(double field, boolean last) throws IOException
      Write a field (double).
      Parameters:
      field - the field to write
      last - whether this is the last field in a record
      Throws:
      IOException - if writing the field failed
      Since:
      2020.10.23 (Christian Borgelt)