nom.tam.fits
Class UndefinedData

java.lang.Object
  extended by nom.tam.fits.Data
      extended by nom.tam.fits.UndefinedData
All Implemented Interfaces:
FitsElement

public class UndefinedData
extends Data

This class provides a simple holder for data which is not handled by other classes.


Field Summary
 
Fields inherited from class nom.tam.fits.Data
dataSize, fileOffset, input
 
Constructor Summary
UndefinedData(Header h)
           
UndefinedData(java.lang.Object x)
          Create an UndefinedData object using the specified object.
 
Method Summary
protected  void fillHeader(Header head)
          Fill header with keywords that describe data.
 java.lang.Object getData()
          Return the actual data.
protected  int getTrueSize()
          Get the size in bytes of the data
 void read(ArrayDataInput i)
          Read a data array into the current object and if needed position to the beginning of the next FITS block.
 void write(ArrayDataOutput o)
          Write the data -- including any buffering needed
 
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

UndefinedData

public UndefinedData(Header h)
              throws FitsException
Throws:
FitsException

UndefinedData

public UndefinedData(java.lang.Object x)
Create an UndefinedData object using the specified object.

Method Detail

fillHeader

protected void fillHeader(Header head)
Fill header with keywords that describe data.

Parameters:
head - The FITS header

read

public void read(ArrayDataInput i)
          throws FitsException
Description copied from class: Data
Read a data array into the current object and if needed position to the beginning of the next FITS block.

Specified by:
read in interface FitsElement
Specified by:
read in class Data
Parameters:
i - The input data stream
Throws:
FitsException

write

public void write(ArrayDataOutput o)
           throws FitsException
Description copied from class: Data
Write the data -- including any buffering needed

Specified by:
write in interface FitsElement
Specified by:
write in class Data
Parameters:
o - The output stream on which to write the data.
Throws:
FitsException

getTrueSize

protected int getTrueSize()
Get the size in bytes of the data


getData

public java.lang.Object getData()
Return the actual data. Note that this may return a null when the data is not readable. It might be better to throw a FitsException, but this is a very commonly called method and we prefered not to change how users must invoke it.

Specified by:
getData in class Data