|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojavax.utils.CRC64Checksum
public class CRC64Checksum
Utility class that calculates a CRC64 checksum on a stream of bytes. Code was based on some from BioPerl. Note that we use longs then cast them to avoid the lack of an unsigned int in Java. Longs are 64-bit but we are only using the bottom 32 bits. An int is 32-bit but encodes sign so we can get amusing results if we don't allow for this.
Constructor Summary | |
---|---|
CRC64Checksum()
Creates a new instance of CRC64Checksum. |
Method Summary | |
---|---|
long |
getValue()
|
void |
reset()
|
String |
toString()
Form: the current CRC64Checksum checksum as a 16-digit hex string. |
void |
update(byte[] values,
int offset,
int len)
|
void |
update(int c)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CRC64Checksum()
Method Detail |
---|
public void reset()
reset
in interface Checksum
public void update(int c)
update
in interface Checksum
public void update(byte[] values, int offset, int len)
update
in interface Checksum
public long getValue()
getValue
in interface Checksum
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |