Package nom.tam.fits

Class UndefinedHDU

All Implemented Interfaces:
FitsElement

public class UndefinedHDU extends BasicHDU<UndefinedData>
A HDU that holds a type of data we don't recognise. We can still access that data in its raw binary form, and the user can interpret the headers to make sense of particular but not (yet) supported FITS HDU types.
See Also:
  • Constructor Details

    • UndefinedHDU

      public UndefinedHDU(Header h, UndefinedData d)
      Deprecated.
      (for internal use) Its visibility should be reduced to package level in the future.
      Build an image HDU using the supplied data.
      Parameters:
      h - the header for this HDU
      d - the data used to build the image.
  • Method Details

    • encapsulate

      @Deprecated public static UndefinedData encapsulate(Object o) throws FitsException
      Deprecated.
      (for internal use) Will reduce visibility in the future
      Parameters:
      o - the object to encapsulate
      Returns:
      Encapsulate an object as an UndefinedHDU.
      Throws:
      FitsException - if the operation failed
    • isData

      @Deprecated public static boolean isData(Object o)
      Deprecated.
      (for internal use) Will reduce visibility in the future
      Checks if we can use the following object as in an Undefined FITS block. Only byte[] arrays can be represented in undefined HDUs.
      Parameters:
      o - a data object
      Returns:
      true if the object is a raw byte[] array, otherwise false. We cannot wrap arbitrary data objects since we do not have a generic recipe for converting these into binary form.
    • isHeader

      @Deprecated public static boolean isHeader(Header hdr)
      Deprecated.
      (for internal use) Will reduce visibility in the future
      Checks if the header is for a HDU we don't really know how to handle. We can still retrieve and store the binary tata of the HDU as a raw byte[] image.
      Parameters:
      hdr - header to check.
      Returns:
      true if this HDU has a valid header.
    • manufactureData

      @Deprecated public static UndefinedData manufactureData(Header hdr) throws FitsException
      Deprecated.
      (for internal use) Will reduce visibility in the future
      Prepares a data object into which the actual data can be read from an input subsequently or at a later time.
      Parameters:
      hdr - The FITS header that describes the data
      Returns:
      A data object that support reading content from a stream.
      Throws:
      FitsException - if the data could not be prepared to prescriotion.
    • manufactureHeader

      @Deprecated public static Header manufactureHeader(Data d) throws FitsException
      Deprecated.
      (for internal use) Will reduce visibility in the future
      Parameters:
      d - The image to be described.
      Returns:
      Create a header that describes the given image data.
      Throws:
      FitsException - if the object does not contain valid image data.
    • info

      public void info(PrintStream stream)
      Description copied from class: BasicHDU
      Print out some information about this HDU.
      Specified by:
      info in class BasicHDU<UndefinedData>
      Parameters:
      stream - the printstream to write the info on