## nom.tam.fits
Class Data

    java.lang.Object
      nom.tam.fits.Data

Direct Known Subclasses:
  BinaryTable, ImageData, RandomGroupsData

public abstract class Data
extends Object

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

Field Summary
`protected Object` `dataArray` This is the object which contains the actual data for the HDU.

Constructor Summary
`Data()`

Method Summary
`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 Object dataArray

  This is the object which contains the actual data for the HDU.
  - For images and primary data this is a simple (but possibly multi-dimensional) primitive array. When group data is supported it will be a possibly multidimensional array of group objects.
  - For ASCII data it is a two dimensional Object array where each of the constituent objects is a primitive array of length 1.
  - For Binary data it is a two dimensional Object array where each of the constituent objects is a primitive array of arbitrary (more or less) dimensionality.

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 Object getData()

  Return the data array object.