Package nom.tam.fits

Class FitsHeap

java.lang.Object
nom.tam.fits.FitsHeap
All Implemented Interfaces:
FitsElement

public class FitsHeap extends Object implements FitsElement
This class supports the FITS heap. This is currently used for variable length columns in binary tables.
  • Method Details

    • getData

      public void getData(int offset, Object array) throws FitsException
      Get data from the heap.
      Parameters:
      offset - The offset at which the data begins.
      array - The array to be extracted.
      Throws:
      FitsException - if the operation failed
    • getFileOffset

      public long getFileOffset()
      Get the file offset of the heap
      Specified by:
      getFileOffset in interface FitsElement
      Returns:
      the byte at which this element begins. This is only available if the data is originally read from a random access medium.
    • getSize

      public long getSize()
      Return the size of the heap using the more bean compatible format
      Specified by:
      getSize in interface FitsElement
      Returns:
      The size of this element in bytes
    • read

      public void read(ArrayDataInput str) throws FitsException
      Read the heap
      Specified by:
      read in interface FitsElement
      Parameters:
      str - The input data stream
      Throws:
      FitsException - if the read was unsuccessful.
    • reset

      public boolean reset()
      Description copied from interface: FitsElement
      Reset the input stream to point to the beginning of this element
      Specified by:
      reset in interface FitsElement
      Returns:
      True if the reset succeeded.
    • rewrite

      public void rewrite() throws IOException, FitsException
      Description copied from interface: FitsElement
      Rewrite the contents of the element in place. The data must have been originally read from a random access device, and the size of the element may not have changed.
      Specified by:
      rewrite in interface FitsElement
      Throws:
      IOException - if the rewrite was unsuccessful.
      FitsException - if the rewrite was unsuccessful.
    • rewriteable

      public boolean rewriteable()
      Specified by:
      rewriteable in interface FitsElement
      Returns:
      true if this element can be rewritten?
    • size

      public int size()
      Returns:
      the size of the Heap
    • write

      public void write(ArrayDataOutput str) throws FitsException
      Write the heap
      Specified by:
      write in interface FitsElement
      Parameters:
      str - The data sink.
      Throws:
      FitsException - if the write was unsuccessful.