|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.ac.starlink.table.AbstractStarTable
uk.ac.starlink.fits.ColFitsStarTable
public class ColFitsStarTable
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.
| Constructor Summary | |
|---|---|
ColFitsStarTable(DataSource datsrc,
nom.tam.fits.Header hdr,
long dataPos,
boolean force,
WideFits wide)
Constructor. |
|
| Method Summary | |
|---|---|
void |
close()
|
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). |
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. |
| Methods inherited from class uk.ac.starlink.table.AbstractStarTable |
|---|
checkedLongToInt, getColumnAuxDataInfos, getName, getParameterByName, getParameters, getURL, setName, setParameter, setParameters, setURL |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ColFitsStarTable(DataSource datsrc,
nom.tam.fits.Header 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 columns
java.io.IOException| Method Detail |
|---|
public int getColumnCount()
StarTable
getColumnCount in interface StarTablegetColumnCount in class AbstractStarTablepublic long getRowCount()
StarTable
getRowCount in interface StarTablegetRowCount in class AbstractStarTablepublic boolean isRandom()
AbstractStarTable
isRandom in interface StarTableisRandom in class AbstractStarTablepublic ColumnInfo getColumnInfo(int icol)
StarTable
getColumnInfo in interface StarTablegetColumnInfo in class AbstractStarTableicol - the column for which header information is required
public java.lang.Object getCell(long irow,
int icol)
throws java.io.IOException
AbstractStarTable
getCell in interface StarTablegetCell in class AbstractStarTableirow - the index of the cell's rowicol - the index of the cell's column
java.io.IOException - if there is an error reading the data
public 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 retrieve
java.io.IOException - if there is an error reading the data
public RowSequence getRowSequence()
throws java.io.IOException
StarTable
getRowSequence in interface StarTablegetRowSequence in class AbstractStarTablejava.io.IOException - if there is an error providing access
public void close()
throws java.io.IOException
close in interface java.io.Closeablejava.io.IOException
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||