prefuse.data.io
Class DelimitedTextTableWriter

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

public class DelimitedTextTableWriter
extends AbstractTableWriter

TableWriter that writes out a delimited text table, using a designated character string to demarcate data columns. By default, a header row containing the column names is included in the output.

Author:
jeffrey heer

Constructor Summary
DelimitedTextTableWriter()
          Create a new DelimitedTextTableWriter that writes tab-delimited text files.
DelimitedTextTableWriter(java.lang.String delimiter)
          Create a new DelimitedTextTableWriter.
DelimitedTextTableWriter(java.lang.String delimiter, boolean printHeader)
          Create a new DelimitedTextTableWriter.
 
Method Summary
 java.lang.String getDelimiter()
          Get the delimiter used to separate data fields.
 boolean isPrintHeader()
          Indicates if this writer will write a header row with the column names.
 void setDelimeter(java.lang.String delimiter)
          Set the delimiter used to separate data fields.
 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

DelimitedTextTableWriter

public DelimitedTextTableWriter()
Create a new DelimitedTextTableWriter that writes tab-delimited text files.


DelimitedTextTableWriter

public DelimitedTextTableWriter(java.lang.String delimiter)
Create a new DelimitedTextTableWriter.

Parameters:
delimiter - the delimiter string to use between columns

DelimitedTextTableWriter

public DelimitedTextTableWriter(java.lang.String delimiter,
                                boolean printHeader)
Create a new DelimitedTextTableWriter.

Parameters:
delimiter - the delimiter string to use between columns
printHeader - indicates if a header row should be printed
Method Detail

getDelimiter

public java.lang.String getDelimiter()
Get the delimiter used to separate data fields.

Returns:
the delimiter string

setDelimeter

public void setDelimeter(java.lang.String delimiter)
Set the delimiter used to separate data fields.

Parameters:
delimiter - the delimiter string

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