|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.ac.starlink.table.formats.CsvTableWriter
A StarTableWriter which outputs to Comma-Separated Value format.
This format is readable by CsvTableBuilder
.
Constructor Summary | |
CsvTableWriter()
|
Method Summary | |
String |
getFormatName()
Returns "CSV". |
boolean |
getWriteHeader()
Indicates whether an initial row containing column names will be written. |
boolean |
looksLikeFile(String location)
Returns true for locations ending ".csv" or ".CSV". |
void |
setWriteHeader(boolean writeHeader)
Indicate whether an initial row containing column names should be written. |
void |
writeStarTable(StarTable table,
String location)
Writes a StarTable object to a given location. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CsvTableWriter()
Method Detail |
public void setWriteHeader(boolean writeHeader)
writeHeader
- true iff you want the first output line to contain
column namespublic boolean getWriteHeader()
public String getFormatName()
getFormatName
in interface StarTableWriter
public boolean looksLikeFile(String location)
looksLikeFile
in interface StarTableWriter
location
- the location name (probably filename)
public void writeStarTable(StarTable table, String location) throws IOException
StarTableWriter
writeStarTable
in interface StarTableWriter
table
- the table to writelocation
- the destination of the written object
(probably, but not necessarily, a filename)
IOException
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |