prefuse.data.io
Class CSVTableWriter

java.lang.Object
  extended by prefuse.data.io.AbstractTableWriter
      extended by prefuse.data.io.CSVTableWriter
All Implemented Interfaces:
TableWriter

public class CSVTableWriter
extends AbstractTableWriter

TableWriter that writes out a text table in the comma-separated-values format. By default, a header row containing the column names is included in the output.

Author:
jeffrey heer

Constructor Summary
CSVTableWriter()
          Create a new CSVTableWriter that writes comma separated values files.
CSVTableWriter(boolean printHeader)
          Create a new CSVTableWriter.
 
Method Summary
 boolean isPrintHeader()
          Indicates if this writer will write a header row with the column names.
 void setPrintHeader(boolean printHeader)
          Sets if this writer will write a header row with the column names.
 void writeTable(Table table, java.io.OutputStream os)
          Write a table from the given OutputStream.
 
Methods inherited from class prefuse.data.io.AbstractTableWriter
writeTable, writeTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSVTableWriter

public CSVTableWriter()
Create a new CSVTableWriter that writes comma separated values files.


CSVTableWriter

public CSVTableWriter(boolean printHeader)
Create a new CSVTableWriter.

Parameters:
printHeader - indicates if a header row should be printed
Method Detail

isPrintHeader

public boolean isPrintHeader()
Indicates if this writer will write a header row with the column names.

Returns:
true if a header row will be printed, false otherwise

setPrintHeader

public void setPrintHeader(boolean printHeader)
Sets if this writer will write a header row with the column names.

Parameters:
printHeader - true to print a header row, false otherwise

writeTable

public void writeTable(Table table,
                       java.io.OutputStream os)
                throws DataIOException
Description copied from interface: TableWriter
Write a table from the given OutputStream.

Parameters:
table - the Table to write
os - the OutputStream to write the table to
Throws:
DataIOException
See Also:
TableWriter.writeTable(prefuse.data.Table, java.io.OutputStream)


Copyright © 2007 Regents of the University of California