Modifier and Type | Field and Description |
---|---|
protected long |
_nByte
Byte count.
|
Constructor and Description |
---|
Checksummer()
Creates a Checksummer, with instances of each of
CRC32, MD5 MessageDigest, and SHA-1 MessageDigest.
|
Modifier and Type | Method and Description |
---|---|
String |
getCRC32()
Returns the value of the CRC32 as a hex string.
|
String |
getMD5()
Returns the value of the MD5 digest as a hex string.
|
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.
|
public Checksummer()
CRC32
,
MessageDigest
public void reset()
public long getValue()
public void update(byte b)
public void update(int b)
public void update(byte[] b)
public void update(byte[] b, int off, int len)
public String getCRC32()
public String getMD5()
public String getSHA1()
Copyright © 2008–2017 The Open Preservation Foundation. All rights reserved.