uk.ac.starlink.table.formats
Class TstTableWriter

java.lang.Object
  extended byuk.ac.starlink.table.StreamStarTableWriter
      extended byuk.ac.starlink.table.formats.TstTableWriter
All Implemented Interfaces:
StarTableWriter

public class TstTableWriter
extends StreamStarTableWriter

Output handler for Tab-Separated Table format. This is used by GAIA/SkyCat amongst other software. Documentation of the format can be found in Starlink System Note 75 (SSN/75).

Since:
27 Jul 2006

Constructor Summary
TstTableWriter()
           
 
Method Summary
 String getFormatName()
          Returns "TST".
 String getMimeType()
          Returns "text/plain".
 boolean looksLikeFile(String location)
          Returns true for location argument which ends in ".tst", ".TST" or ".TAB".
 void writeStarTable(StarTable st, OutputStream out)
          Writes a StarTable object to a given output stream.
 
Methods inherited from class uk.ac.starlink.table.StreamStarTableWriter
writeStarTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TstTableWriter

public TstTableWriter()
Method Detail

getFormatName

public String getFormatName()
Returns "TST".

Returns:
format name

getMimeType

public String getMimeType()
Returns "text/plain".

Returns:
MIME type

looksLikeFile

public boolean looksLikeFile(String location)
Returns true for location argument which ends in ".tst", ".TST" or ".TAB".

Parameters:
location - the intended destination of the output
Returns:
whether it looks suitable for this class

writeStarTable

public void writeStarTable(StarTable st,
                           OutputStream out)
                    throws IOException
Description copied from interface: StarTableWriter
Writes a StarTable object to a given output stream. The implementation can assume that out is suitable for direct writing (for instance it should not normally wrap it in a BufferedOutputStream), and should not close it at the end of the call.

Not all table writers are capable of writing to a stream; an implementation may throw a TableFormatException to indicate that it cannot do so.

Parameters:
st - the table to write
out - the output stream to which startab should be written
Throws:
IOException - if there is some I/O error

Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved.