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 truncatd one.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PaddingException
public PaddingException(Data datum)
throws FitsException
- When the error is thrown, the data object being
read must be supplied. We initially create a dummy
header for this. If someone is reading the entire
HDU, then they can trap the exception and set the header
to the appropriate value.
- Throws:
FitsException
PaddingException
public PaddingException(java.lang.String msg,
Data datum)
throws FitsException
- Throws:
FitsException
getTruncatedHDU
public BasicHDU getTruncatedHDU()