public final class FitsCheckSum extends 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 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.CHECKSUM
data
- the byte sequencepublic static 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 failedCopyright © 1996–2016 nom-tam-fits. All rights reserved.