Interface IHeaderAccess

All Known Implementing Classes:
HeaderAccess, HeaderCardAccess

public interface IHeaderAccess

(for internal use) Interface for accessing FITS header values with runtime exceptions only. Regular header access throws HeaderCardExceptions, which are hard exceptions. They really should have been softer runtime exceptions from the start, but unfortunately that was choice this library made a very long time ago, and we therefore stick to it, at least until the next major code revision (major version 2 at the earliest). So this class provides an alternative access to headers converting any HeaderCardExceptions to IllegalArgumentException.

This is really just a rusty rail implementation, and rather incopmlete at it too. It has very limited support for header access, geared very specifically towards supporting the compression classes of this library, and not mean for use beyond.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addValue(IFitsHeader key, int value)
    Sets a new integer value for the specified FITS keyword, adding it to the FITS header if necessary.
    void
    Sets a new string value for the specified FITS keyword, adding it to the FITS header if necessary.
    Returns the FITS header card for the given FITS keyword.
    Returns the FITS header card for the given FITS keyword.
  • Method Details

    • addValue

      void addValue(IFitsHeader key, int value) throws IllegalArgumentException
      Sets a new integer value for the specified FITS keyword, adding it to the FITS header if necessary.
      Parameters:
      key - the standard or conventional FITS header keyword
      value - the integer value to assign to the keyword
      Throws:
      IllegalArgumentException - if the value could not be set as requested.
    • addValue

      void addValue(IFitsHeader key, String value) throws IllegalArgumentException
      Sets a new string value for the specified FITS keyword, adding it to the FITS header if necessary.
      Parameters:
      key - the standard or conventional FITS header keyword
      value - the string value to assign to the keyword
      Throws:
      IllegalArgumentException - if the value could not be set as requested.
    • findCard

      HeaderCard findCard(IFitsHeader key)
      Returns the FITS header card for the given FITS keyword.
      Parameters:
      key - the standard or conventional FITS header keyword
      Returns:
      the matching FITS header card, or null if there is no such card within out grasp.
    • findCard

      HeaderCard findCard(String key)
      Returns the FITS header card for the given FITS keyword.
      Parameters:
      key - the FITS header keyword
      Returns:
      the matching FITS header card, or null if there is no such card within out grasp.