infovis.table.io
Class CSVTableWriter

java.lang.Object
  extended by infovis.io.AbstractWriter
      extended by infovis.table.io.CSVTableWriter

public class CSVTableWriter
extends AbstractWriter

Write an Excel CVS format a a table.

Version:
$Revision: 1.13 $
Author:
Jean-Daniel Fekete
InfoVis factory arguments:
TableWriterFactory csv

Constructor Summary
CSVTableWriter(OutputStream out, String name, Table table)
          Constructor.
CSVTableWriter(OutputStream out, Table table)
          Constructor.
 
Method Summary
 char getSeparator()
          Returns the separator.
 boolean isLabelLinePresent()
          Returns the labelLinePresent.
 boolean isTypeLinePresent()
          Returns the typeLinePresent.
 String quoteString(String s)
          Returns a quoted string from a specified string.
 void setLabelLinePresent(boolean labelLinePresent)
          Sets the labelLinePresent.
 void setSeparator(char separator)
          Sets the separator.
 void setTypeLinePresent(boolean typeLinePresent)
          Sets the typeLinePresent.
 boolean write()
          Abstract method that performs the actual writing of data.
 
Methods inherited from class infovis.io.AbstractWriter
addAllColumnLabels, addColumnLabel, flush, getColumnLabelAt, getColumnLabels, getEncoding, getName, getOut, getWriter, namedType, setEncoding, write, write, writeBuffer, writeln
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSVTableWriter

public CSVTableWriter(OutputStream out,
                      String name,
                      Table table)
Constructor.

Parameters:
out - the output stream
name - the name
table - the table

CSVTableWriter

public CSVTableWriter(OutputStream out,
                      Table table)
Constructor.

Parameters:
out - the output stream
table - the table
Method Detail

quoteString

public String quoteString(String s)
Returns a quoted string from a specified string.

Parameters:
s - the string
Returns:
a quoted string from a specified string.

write

public boolean write()
Abstract method that performs the actual writing of data.

Specified by:
write in class AbstractWriter

getSeparator

public char getSeparator()
Returns the separator.

Returns:
char

setSeparator

public void setSeparator(char separator)
Sets the separator.

Parameters:
separator - The separator to set

isLabelLinePresent

public boolean isLabelLinePresent()
Returns the labelLinePresent.

Returns:
boolean

isTypeLinePresent

public boolean isTypeLinePresent()
Returns the typeLinePresent.

Returns:
boolean

setLabelLinePresent

public void setLabelLinePresent(boolean labelLinePresent)
Sets the labelLinePresent.

Parameters:
labelLinePresent - The labelLinePresent to set

setTypeLinePresent

public void setTypeLinePresent(boolean typeLinePresent)
Sets the typeLinePresent.

Parameters:
typeLinePresent - The typeLinePresent to set


Copyright © 2005 by Jean-Daniel Fekete and INRIA, France All rights reserved.