|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object eap.fits.FitsHeader
Represents the header of a FITS HDU. The header consists of list of keyword-value pairs which specify the metadata for an HDU. Note that changing the required keywords in a header does not change the corresponding data object (if there is one).
Constructor Summary | |
FitsHeader()
Create a new empty header. |
Method Summary | |
boolean |
add(byte[] block)
add a block of 2880 bytes to the header. |
void |
add(FitsCard card)
add a card to the header. |
int |
blockCount()
returns the number of blocks (including partial blocks) occupied by the header |
FitsCard |
card(int i)
returns the specified card . |
FitsCard |
card(String key)
returns a card with the given keyword. |
int |
cardCount()
returns the number of cards in the header. |
int |
dataSize()
returns the number of bytes in the data which would correspond to this header. |
String |
getName()
returns the name of this extension. |
String |
getType()
returns the type of data accompanying this header. |
boolean |
hasCard(String key)
returns true if the header has at least one card with the given keyword |
boolean |
isComplete()
returns true if this header has been completely read or constructed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FitsHeader()
Method Detail |
public boolean isComplete()
public int blockCount()
public void add(FitsCard card)
card
- the new card to be added.public boolean add(byte[] block)
FitsFile
subclasses.
If the array is larger than 2880 bytes, only the first 2880 bytes will be
read.
block
- an array of 2880 bytes to add to this header.
IndexOutOfBoundsException
- if block does not contain at least 2880
bytes.public boolean hasCard(String key)
key
- the name of the keyword to search forpublic FitsCard card(String key) throws NoSuchFitsCardException
key
- the keyword to search for.
NoSuchFitsCardException
- if the header does not contain the
requested keyword.public FitsCard card(int i) throws NoSuchFitsCardException
i
- the index of the card. The first card is numbered 0.
NoSuchFitsCardException
- if the index is out of bounds.public int cardCount()
public int dataSize() throws eap.fits.FitsCardException
eap.fits.FitsCardException
public String getName()
public String getType() throws FitsException
FitsException
- if there is no SIMPLE or XTENSION keyword in this
header.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |