|
||||||||||
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.BintableStarTable
An implementation of the StarTable interface which uses a FITS BINTABLE extension. Reading is done into the random access data (possibly a mapped file); the nom.tam.fits classes are not used.
It is safe to read cells from different threads.
Field Summary | |
static ValueInfo |
TBCOL_INFO
Column aux metadata key for TBCOLn cards. |
static ValueInfo |
TDISP_INFO
Column aux metadata key for TDISPn cards. |
static ValueInfo |
TFORM_INFO
Column aux metadata key for TFORMn cards. |
static ValueInfo |
TNULL_INFO
Column aux metadata key for TNULLn cards. |
static ValueInfo |
TSCAL_INFO
Column aux metadata key for TSCALn cards. |
static ValueInfo |
TZERO_INFO
Column aux metadata key for TZEROn cards. |
Method Summary | |
List |
getColumnAuxDataInfos()
Goes through the table columns (ColumnInfo objects) and picks out all the AuxData items which exist, generalising where necessary and returning a union of them in alphabetical order by name. |
int |
getColumnCount()
Returns the number of columns in this table. |
ColumnInfo |
getColumnInfo(int icol)
Returns the object describing the data in a given column. |
protected int[] |
getColumnOffsets()
Returns the array of byte offsets from the start of the row at which each column starts. |
long |
getRowCount()
Returns the number of rows in this table, if known. |
protected int |
getRowLength()
Returns the number of bytes occupied in the data stream by a single row of the table. |
static StarTable |
makeRandomStarTable(nom.tam.fits.Header hdr,
nom.tam.util.RandomAccess rstream)
Constructs a StarTable from a given random access stream. |
Object |
readCell(DataInput stream,
int icol)
Reads a cell from a given column from the current position in a stream. |
Object[] |
readRow(DataInput stream)
Reads a whole row of the table from the current position in a stream, returning a new Object[] array. |
void |
readRow(DataInput stream,
Object[] row)
Reads a whole row of the table into an existing array. |
static void |
streamStarTable(nom.tam.fits.Header hdr,
DataInput stream,
TableSink sink)
Reads a BINTABLE extension from a stream and writes the result to a table sink. |
Methods inherited from class uk.ac.starlink.table.AbstractStarTable |
checkedLongToInt, getCell, getName, getParameterByName, getParameters, getRow, getRowSequence, getURL, isRandom, setName, setParameter, setParameters, setURL |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final ValueInfo TNULL_INFO
public static final ValueInfo TSCAL_INFO
public static final ValueInfo TZERO_INFO
public static final ValueInfo TDISP_INFO
public static final ValueInfo TBCOL_INFO
public static final ValueInfo TFORM_INFO
Method Detail |
public static StarTable makeRandomStarTable(nom.tam.fits.Header hdr, nom.tam.util.RandomAccess rstream) throws nom.tam.fits.FitsException
hdr
- FITS header descrbing the HDUrstream
- data stream positioned at the start of the data
section of the HDU
nom.tam.fits.FitsException
public static void streamStarTable(nom.tam.fits.Header hdr, DataInput stream, TableSink sink) throws nom.tam.fits.FitsException, IOException
hdr
- FITS header object describing the BINTABLE extensionstream
- input stream positioned at the start of the
data part of the BINTABLE extensionsink
- destination for the table
nom.tam.fits.FitsException
IOException
public long getRowCount()
StarTable
getRowCount
in interface StarTable
getRowCount
in class AbstractStarTable
public int getColumnCount()
StarTable
getColumnCount
in interface StarTable
getColumnCount
in class AbstractStarTable
public ColumnInfo getColumnInfo(int icol)
StarTable
getColumnInfo
in interface StarTable
getColumnInfo
in class AbstractStarTable
public List getColumnAuxDataInfos()
AbstractStarTable
getColumnAuxDataInfos
in interface StarTable
getColumnAuxDataInfos
in class AbstractStarTable
public Object readCell(DataInput stream, int icol) throws IOException
icol
- the column index corresponding to the cell to be readstream
- a stream containing the byte data, positioned to
the right place
IOException
public Object[] readRow(DataInput stream) throws IOException
stream
- a stream containing the byte data, positioned to
the right place
IOException
public void readRow(DataInput stream, Object[] row) throws IOException
stream
- a stream containing the byte data, positioned to
the right placerow
- ncol-element array, filled with row data
on completion
IOException
protected int getRowLength()
protected int[] getColumnOffsets()
|
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 |