|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object eap.fits.FitsFile eap.fits.InputStreamFitsFile
Represents a FITS file to be read from a serial data source. This class assumes no buffering in the underlying stream, so there is no way to skip an HDU and then go back to read it later.
Field Summary |
Fields inherited from class eap.fits.FitsFile |
BLOCK_SIZE, DATA_NOT_NEEDED, hdus, index, isComplete, NEED_DATA_LATER, NEED_DATA_NOW |
Constructor Summary | |
InputStreamFitsFile(InputStream file)
Create a new object specifiying the data source |
Method Summary | |
FitsHDU |
getHDU(int number)
returns an HDU specified by number. |
FitsHDU |
getHDU(int number,
int when)
returns an HDU specified by number. |
FitsHDU |
getHDU(String name)
returns an HDU specified by EXTNAME |
FitsHDU |
getHDU(String name,
int when)
returns an HDU specified by name with a hint for when to read the data. |
Methods inherited from class eap.fits.FitsFile |
add, createEmpty, isComplete, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public InputStreamFitsFile(InputStream file) throws IOException
file
- the data source
IOException
- if there was a problem creating the file.Method Detail |
public FitsHDU getHDU(int number) throws IOException
getHDU
in class FitsFile
number
- the index of the HDU. The primary HDU is "0".
IOException
- if there was trouble reading the specified HDU from a
file.public FitsHDU getHDU(int number, int when) throws IOException
getHDU
in class FitsFile
number
- the index of the HDU to read. The primary HDU is numbered "0".when
- This parameter is ignored. The data part of the HDU is always read.
IOException
- if there was trouble reading the specified HDU from a
file.public FitsHDU getHDU(String name) throws IOException
getHDU
in class FitsFile
name
- the EXTNAME of the HDU or "PRIMARY" for the primary HDU.
IOException
- if there was trouble reading the specified HDU from a
file.public FitsHDU getHDU(String name, int when) throws IOException
name
- the EXTNAME of the HDU or "PRIMARY" for the primary HDU.when
- this argument is ignored and the data part of the HDU is
always read.
IOException
- if there was trouble with the underlying I/O
NoSuchFitsHDUException
- if the named HDU is not present in the file.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |