Class 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 for location 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 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TstTableWriter

        public TstTableWriter()
    • 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 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,
                                   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 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:
        TableFormatException - if this table cannot be written to a stream
        java.io.IOException - if there is some I/O error