Package nom.tam.fits

Interface FitsElement

All Known Implementing Classes:
AbstractTableData, AsciiTable, AsciiTableHDU, BasicHDU, BinaryTable, BinaryTableHDU, CompressedImageData, CompressedImageHDU, CompressedTableData, CompressedTableHDU, Data, FitsHeap, Header, ImageData, ImageHDU, RandomGroupsData, RandomGroupsHDU, TableHDU, UndefinedData, UndefinedHDU

public interface FitsElement
This interface allows to easily perform basic I/O operations on a FITS element.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
     
    long
     
    void
    Read a data array into the current object and if needed position to the beginning of the next FITS block.
    boolean
    Reset the input stream to point to the beginning of this element
    void
    Rewrite the contents of the element in place.
    boolean
     
    void
    Write the contents of the element to a data sink.
  • Method Details

    • getFileOffset

      long getFileOffset()
      Returns:
      the byte at which this element begins. This is only available if the data is originally read from a random access medium.
    • getSize

      long getSize()
      Returns:
      The size of this element in bytes
    • read

      void read(ArrayDataInput in) throws FitsException, IOException
      Read a data array into the current object and if needed position to the beginning of the next FITS block.
      Parameters:
      in - The input data stream
      Throws:
      FitsException - if the read was unsuccessful.
      IOException - if the read was unsuccessful.
    • reset

      boolean reset()
      Reset the input stream to point to the beginning of this element
      Returns:
      True if the reset succeeded.
    • rewrite

      void rewrite() throws FitsException, IOException
      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.
      Throws:
      FitsException - if the rewrite was unsuccessful.
      IOException - if the rewrite was unsuccessful.
    • rewriteable

      boolean rewriteable()
      Returns:
      true if this element can be rewritten?
    • write

      void write(ArrayDataOutput out) throws FitsException, IOException
      Write the contents of the element to a data sink.
      Parameters:
      out - The data sink.
      Throws:
      FitsException - if the write was unsuccessful.
      IOException - if the write was unsuccessful.