nom.tam.fits
Class BinaryTableHDU

java.lang.Object
  extended by nom.tam.fits.BasicHDU
      extended by nom.tam.fits.TableHDU
          extended by nom.tam.fits.BinaryTableHDU
All Implemented Interfaces:
FitsElement

public class BinaryTableHDU
extends TableHDU

FITS binary table header/data unit


Field Summary
 
Fields inherited from class nom.tam.fits.BasicHDU
BITPIX_BYTE, BITPIX_DOUBLE, BITPIX_FLOAT, BITPIX_INT, BITPIX_LONG, BITPIX_SHORT, isPrimary, myData, myHeader
 
Constructor Summary
BinaryTableHDU(Header hdr, Data datum)
           
 
Method Summary
 int addColumn(java.lang.Object data)
          Add a column without any associated header information.
 java.lang.String[] columnKeyStems()
          What are the standard column stems for a binary table?
static Data encapsulate(java.lang.Object o)
          Encapsulate data in a BinaryTable data type
 void info()
          Print out some information about this HDU.
static boolean isData(java.lang.Object o)
           
 boolean isHeader()
          Check that this HDU has a valid header.
static boolean isHeader(Header header)
          Check that this is a valid binary table header.
 Data manufactureData()
          Create a Data object to correspond to the header description.
static Data manufactureData(Header header)
          Create data from a binary table header.
static Header manufactureHeader(Data data)
          Build a binary table HDU from the supplied data.
 void write(ArrayDataOutput ado)
          Write the contents of the element to a data sink.
 
Methods inherited from class nom.tam.fits.TableHDU
addRow, deleteColumnsIndexOne, deleteColumnsIndexOne, deleteColumnsIndexZero, deleteColumnsIndexZero, deleteRows, deleteRows, findColumn, getColumn, getColumn, getColumnFormat, getColumnName, getElement, getNCols, getNRows, getRow, setColumn, setColumn, setColumnName, setCurrentColumn, setElement, setRow
 
Methods inherited from class nom.tam.fits.BasicHDU
addValue, addValue, addValue, addValue, getAuthor, getAxes, getBitPix, getBlankValue, getBScale, getBUnit, getBZero, getCreationDate, getData, getDummyHDU, getEpoch, getEquinox, getFileOffset, getGroupCount, getHeader, getInstrument, getKernel, getMaximumValue, getMinimumValue, getObject, getObservationDate, getObserver, getOrigin, getParameterCount, getReference, getSize, getTelescope, getTrimmedString, read, readData, rewrite, rewriteable, skipData, skipData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryTableHDU

public BinaryTableHDU(Header hdr,
                      Data datum)
Method Detail

manufactureData

public static Data manufactureData(Header header)
                            throws FitsException
Create data from a binary table header.

Parameters:
header - the template specifying the binary table.
Throws:
FitsException - if there was a problem with the header.

manufactureData

public Data manufactureData()
                     throws FitsException
Description copied from class: BasicHDU
Create a Data object to correspond to the header description.

Returns:
An unfilled Data object which can be used to read in the data for this HDU.
Throws:
FitsException - if the Data object could not be created from this HDU's Header

manufactureHeader

public static Header manufactureHeader(Data data)
                                throws FitsException
Build a binary table HDU from the supplied data.

Parameters:
table - the array used to build the binary table.
Throws:
FitsException - if there was a problem with the data.

encapsulate

public static Data encapsulate(java.lang.Object o)
                        throws FitsException
Encapsulate data in a BinaryTable data type

Throws:
FitsException

isHeader

public static boolean isHeader(Header header)
Check that this is a valid binary table header.

Parameters:
header - to validate.
Returns:
true if this is a binary table header.

isHeader

public boolean isHeader()
Check that this HDU has a valid header.

Returns:
true if this HDU has a valid header.

isData

public static boolean isData(java.lang.Object o)

addColumn

public int addColumn(java.lang.Object data)
              throws FitsException
Add a column without any associated header information.

Specified by:
addColumn in class TableHDU
Parameters:
data - The column data to be added. Data should be an Object[] where type of all of the constituents is identical. The length of data should match the other columns. Note: It is valid for data to be a 2 or higher dimensionality primitive array. In this case the column index is the first (in Java speak) index of the array. E.g., if called with int[30][20][10], the number of rows in the table should be 30 and this column will have elements which are 2-d integer arrays with TDIM = (10,20).
Throws:
FitsException - the column could not be added.

write

public void write(ArrayDataOutput ado)
           throws FitsException
Description copied from interface: FitsElement
Write the contents of the element to a data sink.

Specified by:
write in interface FitsElement
Overrides:
write in class BasicHDU
Parameters:
ado - The data sink.
Throws:
FitsException

info

public void info()
Print out some information about this HDU.

Specified by:
info in class BasicHDU

columnKeyStems

public java.lang.String[] columnKeyStems()
What are the standard column stems for a binary table?

Specified by:
columnKeyStems in class TableHDU