|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nom.tam.fits.Data nom.tam.fits.AsciiTable
public class AsciiTable
An ASCII table.
Field Summary |
---|
Fields inherited from class nom.tam.fits.Data |
---|
dataSize, fileOffset, input |
Constructor Summary | |
---|---|
AsciiTable()
Create an empty ASCII table |
|
AsciiTable(Header hdr)
Create an ASCII table given a header |
Method Summary | |
---|---|
int |
addColumn(java.lang.Object newCol)
Add a row to the table. |
int |
addColumn(java.lang.Object newCol,
int length)
This version of addColumn allows the user to override the default length associated with each column type. |
int |
addRow(java.lang.Object[] newRow)
Add a row to the FITS table. |
void |
deleteColumns(int start,
int len)
Delete columns from the table. |
void |
deleteRows(int start,
int len)
Delete rows from a FITS table |
void |
fillHeader(Header hdr)
Fill in a header with information that points to this data. |
java.lang.Object |
getColumn(int col)
Get a column of data |
java.lang.Object |
getData()
Get the ASCII table information. |
java.lang.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 |
java.lang.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,
java.lang.Object newData)
Replace a column with new data. |
void |
setElement(int row,
int col,
java.lang.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,
java.lang.Object[] newData)
Modify a row in the table |
void |
updateAfterDelete(int oldNCol,
Header hdr)
This is called after we delete columns. |
void |
write(ArrayDataOutput str)
Write the data to an output stream. |
Methods inherited from class nom.tam.fits.Data |
---|
getFileOffset, getKernel, getSize, rewrite, rewriteable, setFileOffset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AsciiTable(Header hdr) throws FitsException
FitsException
public AsciiTable()
Method Detail |
---|
public void read(ArrayDataInput str) throws FitsException
read
in interface FitsElement
read
in class Data
str
- The input data stream
FitsException
public java.lang.Object getData() throws FitsException
getData
in class Data
FitsException
public java.lang.Object getColumn(int col) throws FitsException
getColumn
in interface TableData
FitsException
public java.lang.Object[] getRow(int row) throws FitsException
getRow
in interface TableData
FitsException
public java.lang.Object getElement(int row, int col) throws FitsException
getElement
in interface TableData
FitsException
public void write(ArrayDataOutput str) throws FitsException
write
in interface FitsElement
write
in class Data
str
- The output stream on which to write the data.
FitsException
public void setColumn(int col, java.lang.Object newData) throws FitsException
setColumn
in interface TableData
FitsException
public void setRow(int row, java.lang.Object[] newData) throws FitsException
setRow
in interface TableData
FitsException
public void setElement(int row, int col, java.lang.Object newData) throws FitsException
setElement
in interface TableData
FitsException
public void setNull(int row, int col, boolean flag)
public boolean isNull(int row, int col)
public int addColumn(java.lang.Object newCol) throws FitsException
addColumn
in interface TableData
FitsException
public int addColumn(java.lang.Object newCol, int length) throws FitsException
FitsException
public int addRow(java.lang.Object[] newRow) throws FitsException
addRow
in interface TableData
FitsException
public void deleteRows(int start, int len) throws FitsException
deleteRows
in interface TableData
FitsException
protected int getTrueSize()
public void fillHeader(Header hdr)
public int getNRows()
getNRows
in interface TableData
public int getNCols()
getNCols
in interface TableData
public int getRowLen()
public void deleteColumns(int start, int len) throws FitsException
deleteColumns
in interface TableData
FitsException
public void updateAfterDelete(int oldNCol, Header hdr) throws FitsException
updateAfterDelete
in interface TableData
FitsException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |