Package uk.ac.starlink.fits
Class ColFitsStarTable
- java.lang.Object
-
- uk.ac.starlink.table.AbstractStarTable
-
- uk.ac.starlink.fits.ColFitsStarTable
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,uk.ac.starlink.table.StarTable
public class ColFitsStarTable extends uk.ac.starlink.table.AbstractStarTableStarTable 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, nom.tam.fits.Header hdr, long dataPos, boolean force, WideFits wide)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()java.lang.ObjectgetCell(long irow, int icol)intgetColumnCount()uk.ac.starlink.table.ColumnInfogetColumnInfo(int icol)java.lang.Object[]getRow(long irow)uk.ac.starlink.table.RowAccessgetRowAccess()longgetRowCount()uk.ac.starlink.table.RowSequencegetRowSequence()booleanisRandom()-
Methods inherited from class uk.ac.starlink.table.AbstractStarTable
checkedLongToInt, getColumnAuxDataInfos, getName, getParameters, getRowSplittable, getURL, setName, setParameters, setURL
-
-
-
-
Constructor Detail
-
ColFitsStarTable
public ColFitsStarTable(uk.ac.starlink.util.DataSource datsrc, nom.tam.fits.Header hdr, long dataPos, boolean force, WideFits wide) throws java.io.IOExceptionConstructor.- Parameters:
datsrc- data source containing the FITS datahdr- header of the HDU containing the tabledataPos- offset intofileof the start of the data part of the HDUforce- true to make a table if we possibly can, false to reject if it doesn't look very much like onewide- convention for representing extended columns; use null to avoid use of extended columns- Throws:
java.io.IOException
-
-
Method Detail
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCountin interfaceuk.ac.starlink.table.StarTable- Specified by:
getColumnCountin classuk.ac.starlink.table.AbstractStarTable
-
getRowCount
public long getRowCount()
- Specified by:
getRowCountin interfaceuk.ac.starlink.table.StarTable- Specified by:
getRowCountin classuk.ac.starlink.table.AbstractStarTable
-
isRandom
public boolean isRandom()
- Specified by:
isRandomin interfaceuk.ac.starlink.table.StarTable- Overrides:
isRandomin classuk.ac.starlink.table.AbstractStarTable
-
getColumnInfo
public uk.ac.starlink.table.ColumnInfo getColumnInfo(int icol)
- Specified by:
getColumnInfoin interfaceuk.ac.starlink.table.StarTable- Specified by:
getColumnInfoin classuk.ac.starlink.table.AbstractStarTable
-
getCell
public java.lang.Object getCell(long irow, int icol) throws java.io.IOException- Specified by:
getCellin interfaceuk.ac.starlink.table.StarTable- Overrides:
getCellin classuk.ac.starlink.table.AbstractStarTable- Throws:
java.io.IOException
-
getRow
public java.lang.Object[] getRow(long irow) throws java.io.IOException- Specified by:
getRowin interfaceuk.ac.starlink.table.StarTable- Overrides:
getRowin classuk.ac.starlink.table.AbstractStarTable- Throws:
java.io.IOException
-
getRowSequence
public uk.ac.starlink.table.RowSequence getRowSequence() throws java.io.IOException- Specified by:
getRowSequencein interfaceuk.ac.starlink.table.StarTable- Specified by:
getRowSequencein classuk.ac.starlink.table.AbstractStarTable- Throws:
java.io.IOException
-
getRowAccess
public uk.ac.starlink.table.RowAccess getRowAccess() throws java.io.IOException- Specified by:
getRowAccessin interfaceuk.ac.starlink.table.StarTable- Overrides:
getRowAccessin classuk.ac.starlink.table.AbstractStarTable- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfaceuk.ac.starlink.table.StarTable- Overrides:
closein classuk.ac.starlink.table.AbstractStarTable- Throws:
java.io.IOException
-
-