public class ColFitsStarTable extends AbstractStarTable
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.
| Constructor and Description |
|---|
ColFitsStarTable(DataSource datsrc,
FitsHeader hdr,
long dataPos,
boolean force,
WideFits wide)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
The AbstractStarTable implementation of this method
does nothing.
|
java.lang.Object |
getCell(long irow,
int icol)
The AbstractStarTable implementation of this method throws an
UnsupportedOperationException, since unless otherwise
provided there is no random access.
|
int |
getColumnCount()
Returns the number of columns in this table.
|
ColumnInfo |
getColumnInfo(int icol)
Returns the object describing the data in a given column.
|
java.lang.Object[] |
getRow(long irow)
The AbstractStarTable implementation of this method
constructs a row by repeated invocation of
AbstractStarTable.getCell(long, int). |
RowAccess |
getRowAccess()
Returns an object which can provide random access to this
table's data, if random access is implemented.
|
long |
getRowCount()
Returns the number of rows in this table, if known.
|
RowSequence |
getRowSequence()
Returns an object which can iterate over all the rows in the table
sequentially.
|
boolean |
isRandom()
The AbstractStarTable implementation of this method
returns false.
|
checkedLongToInt, getColumnAuxDataInfos, getName, getParameters, getRowSplittable, getURL, setName, setParameters, setURLclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetParameterByName, setParameterpublic ColFitsStarTable(DataSource datsrc, FitsHeader hdr, long dataPos, boolean force, WideFits wide) throws java.io.IOException
datsrc - data source containing the FITS datahdr - header of the HDU containing the tabledataPos - offset into file of 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 columnsjava.io.IOExceptionpublic int getColumnCount()
StarTablegetColumnCount in interface StarTablegetColumnCount in class AbstractStarTablepublic long getRowCount()
StarTablegetRowCount in interface StarTablegetRowCount in class AbstractStarTablepublic boolean isRandom()
AbstractStarTableisRandom in interface StarTableisRandom in class AbstractStarTablepublic ColumnInfo getColumnInfo(int icol)
StarTablegetColumnInfo in interface StarTablegetColumnInfo in class AbstractStarTableicol - the column for which header information is requiredpublic java.lang.Object getCell(long irow,
int icol)
throws java.io.IOException
AbstractStarTablegetCell in interface StarTablegetCell in class AbstractStarTableirow - the index of the cell's rowicol - the index of the cell's columnjava.io.IOException - if there is an error reading the datapublic java.lang.Object[] getRow(long irow)
throws java.io.IOException
AbstractStarTableAbstractStarTable.getCell(long, int).getRow in interface StarTablegetRow in class AbstractStarTableirow - the index of the row to retrievejava.io.IOException - if there is an error reading the datapublic RowSequence getRowSequence() throws java.io.IOException
StarTablegetRowSequence in interface StarTablegetRowSequence in class AbstractStarTablejava.io.IOException - if there is an error providing accesspublic RowAccess getRowAccess() throws java.io.IOException
StarTablegetRowAccess in interface StarTablegetRowAccess in class AbstractStarTablejava.io.IOException - if there is an error setting up accesspublic void close()
throws java.io.IOException
AbstractStarTableclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface StarTableclose in class AbstractStarTablejava.io.IOException