public class AsciiTable extends Data implements TableData
dataSize, fileOffset, input| Constructor and Description |
|---|
AsciiTable()
Create an empty ASCII table
|
AsciiTable(Header hdr)
Create an ASCII table given a header
|
| Modifier and Type | Method and Description |
|---|---|
int |
addColumn(Object newCol)
Add a row to the table.
|
int |
addColumn(Object newCol,
int length)
This version of addColumn allows the user to override
the default length associated with each column type.
|
int |
addRow(Object[] newRow)
Add a row to the FITS table.
|
void |
fillHeader(Header hdr)
Fill in a header with information that points to this
data.
|
Object |
getColumn(int col)
Get a column of data
|
Object |
getData()
Get the ASCII table information.
|
Object |
getElement(int row,
int col)
Get a single element as a one-d array.
|
int |
getNCols()
Get the number of columns in the table
|
int |
getNRows()
Get the number of rows in the table
|
Object[] |
getRow(int row)
Get a row.
|
int |
getRowLen()
Get the number of bytes in a row
|
protected int |
getTrueSize()
Return the size of the data section
|
boolean |
isNull(int row,
int col)
See if an element is null.
|
void |
read(ArrayDataInput str)
Read in an ASCII table.
|
void |
setColumn(int col,
Object newData)
Replace a column with new data.
|
void |
setElement(int row,
int col,
Object newData)
Modify an element in the table
|
void |
setNull(int row,
int col,
boolean flag)
Mark (or unmark) an element as null.
|
void |
setRow(int row,
Object[] newData)
Modify a row in the table
|
void |
write(ArrayDataOutput str)
Write the data to an output stream.
|
getFileOffset, getKernel, getSize, rewrite, rewriteable, setFileOffsetpublic AsciiTable(Header hdr) throws FitsException
FitsExceptionpublic AsciiTable()
public void read(ArrayDataInput str) throws FitsException
read in interface FitsElementread in class Datastr - The input data streamFitsExceptionpublic Object getData() throws FitsException
getData in class DataFitsExceptionpublic Object getColumn(int col) throws FitsException
getColumn in interface TableDataFitsExceptionpublic Object[] getRow(int row) throws FitsException
getRow in interface TableDataFitsExceptionpublic Object getElement(int row, int col) throws FitsException
getElement in interface TableDataFitsExceptionpublic void write(ArrayDataOutput str) throws FitsException
write in interface FitsElementwrite in class Datastr - The output stream on which to write the data.FitsExceptionpublic void setColumn(int col,
Object newData)
throws FitsException
setColumn in interface TableDataFitsExceptionpublic void setRow(int row,
Object[] newData)
throws FitsException
setRow in interface TableDataFitsExceptionpublic void setElement(int row,
int col,
Object newData)
throws FitsException
setElement in interface TableDataFitsExceptionpublic void setNull(int row,
int col,
boolean flag)
public boolean isNull(int row,
int col)
public int addColumn(Object newCol) throws FitsException
addColumn in interface TableDataFitsExceptionpublic int addColumn(Object newCol, int length) throws FitsException
FitsExceptionpublic int addRow(Object[] newRow) throws FitsException
addRow in interface TableDataFitsExceptionprotected int getTrueSize()
public void fillHeader(Header hdr)
public int getNRows()
public int getNCols()
public int getRowLen()
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.