Package uk.ac.starlink.table.formats
Class TstTableWriter
- java.lang.Object
-
- uk.ac.starlink.table.StreamStarTableWriter
-
- uk.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
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description TstTableWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getFormatName()
Returns "TST".java.lang.String
getMimeType()
Returns "text/plain".boolean
looksLikeFile(java.lang.String location)
Returns true forlocation
argument which ends in ".tst", ".TST" or ".TAB".void
writeStarTable(StarTable st, java.io.OutputStream out)
Writes a StarTable object to a given output stream.-
Methods inherited from class uk.ac.starlink.table.StreamStarTableWriter
writeStarTable
-
-
-
-
Method Detail
-
getFormatName
public java.lang.String getFormatName()
Returns "TST".- Returns:
- format name
-
getMimeType
public java.lang.String getMimeType()
Returns "text/plain".- Returns:
- MIME type
-
looksLikeFile
public boolean looksLikeFile(java.lang.String location)
Returns true forlocation
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, java.io.OutputStream out) throws java.io.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 aBufferedOutputStream
), 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 writeout
- the output stream to which startab should be written- Throws:
TableFormatException
- if this table cannot be written to a streamjava.io.IOException
- if there is some I/O error
-
-