# Class ColFitsStarTable

java.lang.Object
uk.ac.starlink.table.AbstractStarTable
uk.ac.starlink.fits.ColFitsStarTable

All Implemented Interfaces:
  `Closeable, AutoCloseable, uk.ac.starlink.table.StarTable`

public class ColFitsStarTable extends uk.ac.starlink.table.AbstractStarTable
StarTable based on a single-row FITS BINTABLE which contains the data for an entire column in each cell of the table. The BINTABLE must be the first extension of a FITS file.

Some instances of this class hang on to file descriptors. If you are in danger of running out of that resource before insstances are garbage collected, you can call the `close()` method to release them. Attempting to read data following such a call may result in an exception.

Since:
  21 Jun 2006
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`ColFitsStarTable(uk.ac.starlink.util.DataSource datsrc, FitsHeader hdr, long dataPos, boolean force, WideFits wide)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
`Object`
`getCell(long irow, int icol)`
`int`
`getColumnCount()`
`uk.ac.starlink.table.ColumnInfo`
`getColumnInfo(int icol)`
`Object[]`
`getRow(long irow)`
`uk.ac.starlink.table.RowAccess`
`getRowAccess()`
`long`
`getRowCount()`
`uk.ac.starlink.table.RowSequence`
`getRowSequence()`
`boolean`
`isRandom()`

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

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

### Methods inherited from class Object

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

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

`getParameterByName, setParameter`

## Constructor Details

### ColFitsStarTable

public ColFitsStarTable(uk.ac.starlink.util.DataSource datsrc, FitsHeader hdr, long dataPos, boolean force, WideFits wide) throws IOException
Constructor.

Parameters:
  `datsrc` - data source containing the FITS data
  `hdr` - header of the HDU containing the table
  `dataPos` - offset into `file` of the start of the data part of the HDU
  `force` - true to make a table if we possibly can, false to reject if it doesn't look very much like one
  `wide` - convention for representing extended columns; use null to avoid use of extended columns
Throws:
  `IOException`

## Method Details

### getColumnCount

public int getColumnCount()

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

### getRowCount

public long getRowCount()

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

### isRandom

public boolean isRandom()

Specified by:
  `isRandom` in interface `uk.ac.starlink.table.StarTable`
Overrides:
  `isRandom` 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`

### getCell

public Object getCell(long irow, int icol) throws IOException

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

### getRow

public Object[] getRow(long irow) throws IOException

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

### getRowSequence

public uk.ac.starlink.table.RowSequence getRowSequence() throws IOException

Specified by:
  `getRowSequence` in interface `uk.ac.starlink.table.StarTable`
Specified by:
  `getRowSequence` in class `uk.ac.starlink.table.AbstractStarTable`
Throws:
  `IOException`

### getRowAccess

public uk.ac.starlink.table.RowAccess getRowAccess() throws IOException

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

### close

public void close() throws IOException

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Closeable`
Specified by:
  `close` in interface `uk.ac.starlink.table.StarTable`
Overrides:
  `close` in class `uk.ac.starlink.table.AbstractStarTable`
Throws:
  `IOException`