uk.ac.starlink.fits
Class HduFitsTableWriter

java.lang.Object
  extended byuk.ac.starlink.table.StreamStarTableWriter
      extended byuk.ac.starlink.fits.AbstractFitsTableWriter
          extended byuk.ac.starlink.fits.HduFitsTableWriter
All Implemented Interfaces:
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

Constructor Summary
HduFitsTableWriter()
          Constructor.
 
Method Summary
protected  FitsTableSerializer createSerializer(StarTable table)
          Provides a suitable serializer for a given table.
 boolean looksLikeFile(String location)
          Returns false.
 void writePrimaryHDU(StarTable startab, FitsTableSerializer fitser, DataOutput out)
          Does nothing.
 
Methods inherited from class uk.ac.starlink.fits.AbstractFitsTableWriter
addMetadata, getCurrentDate, getFormatName, getMimeType, setFormatName, writeStarTable, writeTableHDU
 
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

HduFitsTableWriter

public HduFitsTableWriter()
Constructor.

Method Detail

writePrimaryHDU

public void writePrimaryHDU(StarTable startab,
                            FitsTableSerializer fitser,
                            DataOutput out)
                     throws IOException
Does nothing.

Specified by:
writePrimaryHDU in class AbstractFitsTableWriter
Parameters:
startab - the table which will be written into the next HDU
fitser - fits serializer initialised from table
out - destination stream
Throws:
IOException

looksLikeFile

public boolean looksLikeFile(String location)
Returns false.

Parameters:
location - the location name (probably filename)
Returns:
true iff it looks like a file this writer would normally write

createSerializer

protected FitsTableSerializer createSerializer(StarTable table)
                                        throws IOException
Description copied from class: AbstractFitsTableWriter
Provides a suitable serializer for a given table.

Specified by:
createSerializer in class AbstractFitsTableWriter
Parameters:
table - table to serialize
Returns:
FITS serializer
Throws:
IOException

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