Class AbstractTableData
java.lang.Object
nom.tam.fits.Data
nom.tam.fits.AbstractTableData
- All Implemented Interfaces:
FitsElement, TableData
- Direct Known Subclasses:
AsciiTable, BinaryTable
Deprecated.
Just an abstract class to reuse the myData in all subclasses of the HDU's.
- Author:
- Richard van Nieuwenhoven
-
Method Summary
Methods inherited from class Data
calcChecksum, detach, getData, getFileOffset, getKernel, getSize, isDeferred, isEmpty, read, reset, rewrite, rewriteable, toHDU, writeModifier and TypeMethodDescriptionlongComputes and returns the FITS checksum for this data, for example to compare against the storedDATASUMin the FITS header (e.g. viaBasicHDU.getStoredDatasum()).voiddetach()Detaches this data object from the input (if any), such as a file or stream, but not before loading data from the previously assigned input into memory.getData()Returns the underlying Java representation of the data contained in this HDU's data segment.longReturns the byte offset at which this element starts ina file.final ObjectSame asData.getData().longgetSize()Returns the size of this elements in the FITS representation.booleanChecks if the data should be assumed to be in deferred read mode.booleanisEmpty()Checks if the data content is currently empty, i.e. no actual data is currently stored in memory.voidread(ArrayDataInput in) Reads the data or skips over it for reading later, depending on whether reading from a stream or a random acessible input, respectively.booleanreset()Reset the input stream to point to the beginning of this elementvoidrewrite()Rewrite the contents of the element in place.booleanChecks if we can write this element back to its source.abstract BasicHDU<?> toHDU()Returns an approprotae HDU object that encapsulates this FITS data, and contains the minimal mandatory header description for that data.abstract voidWrites the contents of the element to a data sink, adding padding as necessary if the element (such as a header or data segment) is expected to complete the FITS block of 2880 bytes.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TableData
addColumn, addRow, addRowEntries, deleteColumns, deleteRows, getColumn, getElement, getNCols, getNRows, getRow, setColumn, setElement, setRow, setRowEntries, updateAfterDeleteModifier and TypeMethodDescriptionintAdd a column to the table, without updating the header of an encompassing HDU.intAdd a row at the end of the table without updating the header of an encompassing HDU.default intaddRowEntries(Object... entries) LikeTableData.addRow(Object[]), but with a vararg list of row entries.voiddeleteColumns(int col, int len) Removes a set of consecutive columns from this table, without updating assocu=iated the header information for the columns that were removed.voiddeleteRows(int row, int len) Removes a set of consecutive rows from this table without updating any associated header information for an encompassing HDU.getColumn(int col) Returns the data for a particular column in as an array of elements.getElement(int row, int col) Returns the data element in this table.intgetNCols()Returns the number of columns contained in this table.intgetNRows()Returns the number of columns contained in this table.Object[]getRow(int row) Returns an array of elements in a particualr table row.voidSets new data for a table column.voidsetElement(int row, int col, Object element) Sets new data element in this table.voidSets new data for a table row.default voidsetRowEntries(int row, Object... entries) LikeTableData.setRow(int, Object[])but with vararg list of entries.voidupdateAfterDelete(int oldNcol, Header hdr) Deprecated.It is not entirely foolproof for keeping the header in sync -- it is better to (re)wrap tables in a new HDU after column deletions, and then edit the new header as necessary to incorporate custom entries.
AsciiTableextendDataand implementTableDatainstead.