## nom.tam.fits
Class BinaryTableHeaderParser

    java.lang.Object
      nom.tam.fits.BinaryTableHeaderParser

public class BinaryTableHeaderParser
extends Object

This class defines the methods for accessing FITS binary table header information.

Field Summary
`(package private) Header` `myHeader`

Constructor Summary
`BinaryTableHeaderParser(Header myHeader)` Parse an existing header.

Method Summary
`static void` `addColumn(int column, Object[] col, Header myHeader)` Add a column to the header information.
`protected void` `checkLT0(int i, String errmsg)` Check if a value is less than 0 and throw an error if so.
`protected Object` `getColumnDef(int col)` Get the format for a given column
`Object[]` `getModelRow()` Create a model row for a binary table given a describing header.
`static int[]` `getTDims(String tdims, int arrsiz)` Parse the TDIMS value.
`(package private) static void` `pointToCol(Header myHeader, int col, int size, int[] dimens, char type)` Add information in the header to describe a single column.
`static Header` `pointToTable(BinaryTable table)` Make the header describe the a table where we give only.
`static Header` `pointToTable(BinaryTable table, Header myHeader)` Make the header describe a specified table and included existing header information.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### myHeader

    Header myHeader

Constructor Detail

### BinaryTableHeaderParser

    public BinaryTableHeaderParser(Header myHeader)
                            throws FitsException

  Parse an existing header.

Method Detail

### getModelRow

    public Object[] getModelRow()
                         throws FitsException

  Create a model row for a binary table given a describing header.

  Returns:
    A model row for the table.
  Throws:
    `FitsException`

### checkLT0

    protected void checkLT0(int i,
                            String errmsg)
                     throws FitsException

  Check if a value is less than 0 and throw an error if so.

  Parameters:
    `i` - The value to be checked.
  Throws:
    `FitsException`

### getColumnDef

    protected Object getColumnDef(int col)
                           throws FitsException

  Get the format for a given column

  Parameters:
    `col` - the column being examined.
  Returns:
    an object of the type described in the column header info. Note that only the TFORM and TDIM keywords are examined.
  Throws:
    `FitsException`

### getTDims

    public static int[] getTDims(String tdims,
                                 int arrsiz)

  Parse the TDIMS value. If the TDIMS value cannot be deciphered a one-d array with the size given in arrsiz is returned.

  Parameters:
    `tdims` - The value of the TDIMSn card.
    `arrsiz` - The size field found on the TFORMn card.
  Returns:
    An int array of the desired dimensions. Note that the order of the tdims is the inverser of the order in the TDIMS key.

### pointToTable

    public static Header pointToTable(BinaryTable table)
                               throws FitsException

  Make the header describe the a table where we give only. a single row of the table and the number of rows.

  Throws:
    `FitsException` - if the table was not valid.

### pointToTable

    public static Header pointToTable(BinaryTable table,
                                      Header myHeader)
                               throws FitsException

  Make the header describe a specified table and included existing header information.

  Parameters:
    `table` - The binary table data.
    `myHeader` - An existing header for this data. It will be modified as needed, but excess keywords will not be pruned.
  Throws:
    `FitsException`

### addColumn

    public static void addColumn(int column,
                                 Object[] col,
                                 Header myHeader)
                          throws FitsException

  Add a column to the header information.

  Parameters:
    `column` - The column index for the new column.
    `col` - The column data.
    `myHeader` - The existing header for the table.
  Throws:
    `FitsException`

### pointToCol

    static void pointToCol(Header myHeader,
                           int col,
                           int size,
                           int[] dimens,
                           char type)
                    throws FitsException

  Add information in the header to describe a single column.

  Parameters:
    `myHeader` - The header to be updated.
    `col` - The column index.
    `size` - The number of elements in the column per row
    `dimens` - The dimensions of the column.
    `type` - A character indicating the type of data.
  Throws:
    `FitsException`