Package nom.tam.fits
Class PaddingException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- nom.tam.fits.FitsException
-
- nom.tam.fits.PaddingException
-
- All Implemented Interfaces:
java.io.Serializable
public class PaddingException extends FitsException
This exception is thrown if an error is found reading the padding following a valid FITS HDU. This padding is required by the FITS standard, but some FITS writes forego writing it. To access such data users can use something like:Fits f = new Fits("somefile"); try { f.read(); } catch (PaddingException e) { f.addHDU(e.getHDU()); }
to ensure that a truncated HDU is included in the FITS object. Generally the FITS file have already added any HDUs prior to the truncated one.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
serial version id.private BasicHDU<?>
truncatedHDU
The HDU where the error happened.
-
Constructor Summary
Constructors Constructor Description PaddingException(java.lang.String msg, Data data, java.lang.Exception cause)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BasicHDU<?>
getTruncatedHDU()
(package private) void
updateHeader(Header hdr)
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
serial version id.- See Also:
- Constant Field Values
-
truncatedHDU
private BasicHDU<?> truncatedHDU
The HDU where the error happened.
-
-
Constructor Detail
-
PaddingException
public PaddingException(java.lang.String msg, Data data, java.lang.Exception cause) throws FitsException
- Throws:
FitsException
-
-
Method Detail
-
getTruncatedHDU
public BasicHDU<?> getTruncatedHDU()
-
updateHeader
void updateHeader(Header hdr) throws FitsException
- Throws:
FitsException
-
-