nom.tam.fits
Class Data

java.lang.Object
  extended by nom.tam.fits.Data
Direct Known Subclasses:
BinaryTable, ImageData, RandomGroupsData

public abstract class Data
extends java.lang.Object

This class provides methods to access the data segment of an HDU.


Field Summary
protected  java.lang.Object dataArray
          This is the object which contains the actual data for the HDU.
 
Constructor Summary
Data()
           
 
Method Summary
 java.lang.Object getData()
          Return the data array object.
 int getPaddedSize()
          Get the size of the entire data area including any padding.
 int getPadding()
          Get the amount of padding needed to fill in or skip to the beginning of the next FITS block.
 int getTrueSize()
          Get the size of the actual data elements.
 void read(BufferedDataInputStream i)
          Read a data array into the current object and if needed position to the beginning of the next FITS block.
protected  void readTrueData(BufferedDataInputStream i)
          Read in the actual data portion.
 void write(BufferedDataOutputStream o)
          Write the data -- including any buffering needed
protected  void writeTrueData(BufferedDataOutputStream o)
          Write only the actual data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dataArray

protected java.lang.Object dataArray
This is the object which contains the actual data for the HDU.

Constructor Detail

Data

public Data()
Method Detail

write

public void write(BufferedDataOutputStream o)
           throws FitsException
Write the data -- including any buffering needed

Parameters:
o - The output stream on which to write the data.
Throws:
FitsException

read

public void read(BufferedDataInputStream i)
          throws FitsException
Read a data array into the current object and if needed position to the beginning of the next FITS block.

Parameters:
i - The input data stream
Throws:
FitsException

writeTrueData

protected void writeTrueData(BufferedDataOutputStream o)
                      throws FitsException
Write only the actual data.

Parameters:
o - The output stream on which to write the data.
Throws:
FitsException

readTrueData

protected void readTrueData(BufferedDataInputStream i)
                     throws FitsException
Read in the actual data portion. This method needs to be overriden for ASCII tables and for binary tables with variable length data.

Parameters:
i - The input stream.
Throws:
FitsException

getPadding

public int getPadding()
Get the amount of padding needed to fill in or skip to the beginning of the next FITS block.


getTrueSize

public int getTrueSize()
Get the size of the actual data elements.


getPaddedSize

public int getPaddedSize()
Get the size of the entire data area including any padding.


getData

public java.lang.Object getData()
Return the data array object.