Package uk.ac.starlink.fits

## Class FitsStarTable

- java.lang.Object
- - uk.ac.starlink.table.AbstractStarTable
  - - uk.ac.starlink.table.RandomStarTable
    - - uk.ac.starlink.fits.FitsStarTable

- All Implemented Interfaces:
    `java.io.Closeable`, `java.lang.AutoCloseable`, `uk.ac.starlink.table.StarTable`

      public class FitsStarTable
      extends uk.ac.starlink.table.RandomStarTable

  An implementation of the StarTable interface which uses FITS TABLE or BINTABLE extensions.

  This implementation uses the table handling in the `nom.tam.fits` package. I think that performance could be considerably improved by rewriting the table access from scratch. The reason for this is largely that the nom.tam.fits classes do a lot of wrapping of values in (perhaps multi-dimensional) arrays, which is not for our purposes necessary. Such a re-implementation would take a bit of effort unfortunately.

  This class should only be used for TABLE extension (that is ASCII table) HDUs. The `BintableStarTable` class is much more efficient for BINTTABLE extensions (binary table) HDUs.

  Author:
    Mark Taylor (Starlink)

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FitsStarTable​(nom.tam.fits.TableHDU thdu)` | Constructs a FitsStarTable object from a FITS TableHDU object.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.Object` | `getCell​(long lrow, int icol)` |
    `java.util.List<uk.ac.starlink.table.ValueInfo>` | `getColumnAuxDataInfos()` |
    `int` | `getColumnCount()` |
    `uk.ac.starlink.table.ColumnInfo` | `getColumnInfo​(int icol)` |
    `java.lang.Object[]` | `getRow​(long lrow)` |
    `long` | `getRowCount()` |

    - ### Methods inherited from class uk.ac.starlink.table.RandomStarTable

      `getRowAccess, getRowSequence, isRandom`

    - ### Methods inherited from class uk.ac.starlink.table.AbstractStarTable

      `checkedLongToInt, close, getName, getParameters, getRowSplittable, getURL, setName, setParameters, setURL`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface uk.ac.starlink.table.StarTable

      `getParameterByName, setParameter`

- - ### Constructor Detail

    - #### FitsStarTable

          public FitsStarTable​(nom.tam.fits.TableHDU thdu)
                        throws java.io.IOException

      Constructs a FitsStarTable object from a FITS TableHDU object.
      Parameters:
        `thdu` - a TableHDU object containing data
      Throws:
        `java.io.IOException`

  - ### Method Detail

    - #### getRowCount

          public long getRowCount()

      Specified by:
        `getRowCount` in interface `uk.ac.starlink.table.StarTable`
      Specified by:
        `getRowCount` in class `uk.ac.starlink.table.RandomStarTable`

    - #### getColumnCount

          public int getColumnCount()

      Specified by:
        `getColumnCount` in interface `uk.ac.starlink.table.StarTable`
      Specified by:
        `getColumnCount` in class `uk.ac.starlink.table.AbstractStarTable`

    - #### getColumnInfo

          public uk.ac.starlink.table.ColumnInfo getColumnInfo​(int icol)

      Specified by:
        `getColumnInfo` in interface `uk.ac.starlink.table.StarTable`
      Specified by:
        `getColumnInfo` in class `uk.ac.starlink.table.AbstractStarTable`

    - #### getColumnAuxDataInfos

          public java.util.List<uk.ac.starlink.table.ValueInfo> getColumnAuxDataInfos()

      Specified by:
        `getColumnAuxDataInfos` in interface `uk.ac.starlink.table.StarTable`
      Overrides:
        `getColumnAuxDataInfos` in class `uk.ac.starlink.table.AbstractStarTable`

    - #### getCell

          public java.lang.Object getCell​(long lrow,
                                          int icol)
                                   throws java.io.IOException

      Specified by:
        `getCell` in interface `uk.ac.starlink.table.StarTable`
      Specified by:
        `getCell` in class `uk.ac.starlink.table.RandomStarTable`
      Throws:
        `java.io.IOException`

    - #### getRow

          public java.lang.Object[] getRow​(long lrow)
                                    throws java.io.IOException

      Specified by:
        `getRow` in interface `uk.ac.starlink.table.StarTable`
      Overrides:
        `getRow` in class `uk.ac.starlink.table.AbstractStarTable`
      Throws:
        `java.io.IOException`