public abstract class AsciiTableStarTable extends AbstractStarTable
Constructor and Description |
---|
AsciiTableStarTable(FitsHeader hdr)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static AsciiTableStarTable |
createTable(FitsHeader hdr,
InputFactory inputFact)
Creates a table instance from a TABLE HDU.
|
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[] |
getColumnLengths()
Returns the array of column lengths in bytes.
|
protected int[] |
getColumnOffsets()
Returns the array of column offsets from the start of the row.
|
long |
getRowCount()
Returns the number of rows in this table, if known.
|
protected int |
getRowLength()
Returns the length of each row in bytes.
|
protected Object |
readCell(byte[] cellBuf,
int icol)
Reads the content of a cell of this table from a byte buffer.
|
protected Object[] |
readRow(byte[] rowBuf)
Reads the content of a row of this table from a byte buffer.
|
static void |
streamStarTable(FitsHeader hdr,
BasicInput input,
TableSink sink)
Reads a TABLE HDU from a stream and writes the result to
a table sink.
|
checkedLongToInt, close, getCell, getColumnAuxDataInfos, getName, getParameters, getRow, getRowAccess, getRowSequence, getRowSplittable, getURL, isRandom, setName, setParameters, setURL
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getParameterByName, setParameter
public AsciiTableStarTable(FitsHeader hdr) throws IOException
hdr
- ASCII TABLE extension headerIOException
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
icol
- the column for which header information is requiredicol
protected int getRowLength()
protected int[] getColumnOffsets()
protected int[] getColumnLengths()
protected Object[] readRow(byte[] rowBuf)
rowBuf
- buffer containing rowLeng bytesprotected Object readCell(byte[] cellBuf, int icol)
cellBuf
- buffer containing bytes for column contenticol
- column indexpublic static AsciiTableStarTable createTable(FitsHeader hdr, InputFactory inputFact) throws IOException
hdr
- FITS header for ASCII tableinputFact
- input factory for Data part of HDUIOException
public static void streamStarTable(FitsHeader hdr, BasicInput input, TableSink sink) throws IOException
hdr
- FITS header object describing the TABLE extensioninput
- input stream positioned at the start of the
data part of the TABLE extensionsink
- destination for the tableIOException
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.