public final class FitsCheckSum
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static long |
checksum(byte[] data)
Calculate the Seaman-Pence 32-bit 1's complement checksum over the byte
stream.
|
static java.lang.String |
checksumEnc(long c,
boolean compl)
Encode a 32bit integer according to the Seaman-Pence proposal.
|
static void |
setChecksum(BasicHDU<?> hdu)
Add or update the CHECKSUM keyword.
|
public static long checksum(byte[] data)
Checksum.CHECKSUMdata - the byte sequencepublic static java.lang.String checksumEnc(long c,
boolean compl)
c - the checksum previously calculatedcompl - complement the valuepublic static void setChecksum(BasicHDU<?> hdu) throws FitsException
hdu - the HDU to be updated.FitsException - if the operation failed