|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteap.fits.FitsFile
eap.fits.RandomAccessFitsFile
Represents a FitsFile which can be read from a RandomAccessFile data source. A random access data source allows you to skip over HDUs and then go back to read them later. So this class can take full advantage of the hints given to the getHDU methods. Note however that the "NEED_DATA_LATER" option is not currently well tested and may contain bugs.
| 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 | |
RandomAccessFitsFile(RandomAccessFile file)
Create a FITS file object which can be read from the given RandomAccessFile. |
|
| Method Summary | |
FitsHDU |
getHDU(int number)
returns an HDU specified by number. |
FitsHDU |
getHDU(int number,
int when)
Returns the given HDU, specifying a hint as to when to read the data. |
FitsHDU |
getHDU(String name)
returns an HDU specified by name. |
FitsHDU |
getHDU(String name,
int when)
returns an HDU specified by name with a hint as to 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 RandomAccessFitsFile(RandomAccessFile file)
throws IOException
file - the data source
IOException - if there was trouble creating the FitsFile| Method Detail |
public FitsHDU getHDU(int number)
throws IOException
getHDU(int, int) with FitsFile.NEED_DATA_NOW.
getHDU in class FitsFilenumber - the index of HDU to be read. The primary HDU is numbered 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 FitsFilenumber - the index of HDU to be read. The primary HDU is numbered 0.when - a hint as to when to read the data part of the HDU.
FitsFile.NEED_DATA_NOW - read the data before returning
FitsFile.NEED_DATA_LATER - read the data in a separate thread
after returning
FitsFile.DATA_NOT_NEEDED - don't read the data
IOException - if there was trouble with the underlying I/O or with the
FITS formating.
NoSuchFitsHDUException - if the file does not have the specified HDU.
public FitsHDU getHDU(String name)
throws IOException
getHDU(String, int) with FitsFile.NEED_DATA_NOW
getHDU in class FitsFilename - the EXTNAME value for the desired HDU or "PRIMARY" for the
primary HDU.
IOEXCEPTION - if there was a problem with the underlying I/O or
the FITS format.
IOException - if there was trouble reading the specified HDU from a
file.
public FitsHDU getHDU(String name,
int when)
throws IOException
name - the EXTNAME value for the desired HDU or "PRIMARY" for the
primary HDU.when - a hint as to when to read the data part of the HDU.
FitsFile.NEED_DATA_NOW - read the data before returning
FitsFile.NEED_DATA_LATER - read the data in a separate thread
after returning
FitsFile.DATA_NOT_NEEDED - don't read the data
IOEXCEPTION - if there was a problem with the underlying I/O or
the FITS format.
NoSuchFitsHDUException - if the file does not have the named HDU
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||