nom.tam.fits
Class HDU

java.lang.Object
  extended by nom.tam.fits.HDU

public class HDU
extends java.lang.Object

Methods to read/write FITS Header/Data unit (HDU). This class is generally used either to get access to the Header and Data objects, or to perform manipulations which affect both the Header and Data.


Constructor Summary
HDU()
           
 
Method Summary
static BasicHDU create(Header header)
          Create an HDU from the supplied Header object.
static BasicHDU create(java.lang.Object x)
          Create an HDU which points to the given object.
static AsciiTableHDU createAsciiTable(java.lang.Object[][] x)
           
static RandomGroupsHDU createRandomGroups(java.lang.Object[][] x)
           
static BasicHDU readHDU(BufferedDataInputStream stream)
          Read an HDU.
static boolean skipHDU(BufferedDataInputStream input)
          Skip an HDU
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HDU

public HDU()
Method Detail

create

public static BasicHDU create(java.lang.Object x)
                       throws FitsException
Create an HDU which points to the given object. This may be either a primitive array or an 2-d array of objects.

Parameters:
x - The data to which the HDU points.
Returns:
the appropriate HDU object
Throws:
FitsException - if the HDU could not be created.

createRandomGroups

public static RandomGroupsHDU createRandomGroups(java.lang.Object[][] x)
                                          throws FitsException
Throws:
FitsException

createAsciiTable

public static AsciiTableHDU createAsciiTable(java.lang.Object[][] x)
                                      throws FitsException
Throws:
FitsException

create

public static BasicHDU create(Header header)
                       throws FitsException
Create an HDU from the supplied Header object.

Parameters:
header - the Header for the HDU to be created.
Returns:
the appropriate HDU object
Throws:
FitsException - if the HDU could not be created.

readHDU

public static BasicHDU readHDU(BufferedDataInputStream stream)
                        throws FitsException,
                               java.io.IOException
Read an HDU. This is the usual method by which the Fits class reads an HDU.

Parameters:
stream - The data stream the FITS data is to be found on.
Returns:
The HDU that has been read.
Throws:
FitsException - if there was a problem with the data.
java.io.IOException

skipHDU

public static boolean skipHDU(BufferedDataInputStream input)
                       throws FitsException,
                              java.io.IOException
Skip an HDU

Returns:
true if the HDU was skipped.
Throws:
FitsException - if the data could not be skipped.
java.io.IOException