|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.harvard.hul.ois.jhove.Checksummer
public class Checksummer
The Checksummer class encapsulates the calculation of the CRC32, MD5, and SHA-1 checksums.
Field Summary | |
---|---|
protected long |
_nByte
Byte count. |
Constructor Summary | |
---|---|
Checksummer()
Creates a Checksummer, with instances of each of CRC32, MD5 MessageDigest, and SHA-1 MessageDigest. |
Method Summary | |
---|---|
java.lang.String |
getCRC32()
Returns the value of the CRC32 as a hex string. |
java.lang.String |
getMD5()
Returns the value of the MD5 digest as a hex string. |
java.lang.String |
getSHA1()
Returns the value of the SHA-1 digest as a hex string. |
long |
getValue()
getValue is required by the Checksum interface, but we can return only one of the three values. |
void |
reset()
Resets all checksums and the byte count to their initial values. |
void |
update(byte b)
Updates the checksum with the argument. |
void |
update(byte[] b)
Updates the checksum with the argument. |
void |
update(byte[] b,
int off,
int len)
Updates the checksum with the argument. |
void |
update(int b)
Updates the checksum with the argument. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected long _nByte
Constructor Detail |
---|
public Checksummer()
CRC32
,
MessageDigest
Method Detail |
---|
public void reset()
reset
in interface java.util.zip.Checksum
public long getValue()
getValue
in interface java.util.zip.Checksum
public void update(byte b)
public void update(int b)
update
in interface java.util.zip.Checksum
public void update(byte[] b)
public void update(byte[] b, int off, int len)
update
in interface java.util.zip.Checksum
public java.lang.String getCRC32()
public java.lang.String getMD5()
public java.lang.String getSHA1()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |