Class HduFitsTableWriter

  • All Implemented Interfaces:
    uk.ac.starlink.table.MultiStarTableWriter, uk.ac.starlink.table.StarTableWriter

    public class HduFitsTableWriter
    extends AbstractFitsTableWriter
    TableWriter which writes a single extension BINTABLE HDU containing the table. It differs from FitsTableWriter in that it does not write a primary HDU, so the result will only form a legal FITS file if it is appended to an existing FITS file which already has a primary HDU, and possibly other extension HDUs already. This class can be used to generate a multi-extension FITS file.
    Since:
    23 Oct 2009
    Author:
    Mark Taylor
    • Constructor Detail

      • HduFitsTableWriter

        public HduFitsTableWriter()
        Default constructor.
      • HduFitsTableWriter

        public HduFitsTableWriter​(java.lang.String name,
                                  boolean allowSignedByte,
                                  WideFits wide)
        Custom constructor.
        Parameters:
        name - writer name
        allowSignedByte - if true, bytes written as FITS signed bytes (TZERO=-128), if false bytes written as signed shorts
        wide - convention for representing over-wide tables; null to avoid this convention
    • Method Detail

      • looksLikeFile

        public boolean looksLikeFile​(java.lang.String location)
        Returns false.
      • createSerializer

        protected FitsTableSerializer createSerializer​(uk.ac.starlink.table.StarTable table)
                                                throws java.io.IOException
        Description copied from class: AbstractFitsTableWriter
        Provides a suitable serializer for a given table. Note this should throw an IOException if it can be determined that the submitted table cannot be written by this writer, for instance if it has too many columns.
        Specified by:
        createSerializer in class AbstractFitsTableWriter
        Parameters:
        table - table to serialize
        Returns:
        FITS serializer
        Throws:
        java.io.IOException - if the table can't be written