Package com.emc.object.util
Class RunningChecksum
- java.lang.Object
-
- com.emc.object.util.ChecksumValue
-
- com.emc.object.util.RunningChecksum
-
public class RunningChecksum extends ChecksumValue
Used to store, update and compute checksums
-
-
Constructor Summary
Constructors Constructor Description RunningChecksum(ChecksumAlgorithm algorithm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChecksumAlgorithm
getAlgorithm()
byte[]
getByteValue()
java.lang.String
getHexValue()
long
getOffset()
void
update(byte[] buffer, int offset, int length)
Updates the checksum with the given buffer's contents
-
-
-
Constructor Detail
-
RunningChecksum
public RunningChecksum(ChecksumAlgorithm algorithm) throws java.security.NoSuchAlgorithmException
- Throws:
java.security.NoSuchAlgorithmException
-
-
Method Detail
-
update
public void update(byte[] buffer, int offset, int length)
Updates the checksum with the given buffer's contents- Parameters:
buffer
- data to updateoffset
- start in bufferlength
- number of bytes to use from buffer starting at offset
-
getAlgorithm
public ChecksumAlgorithm getAlgorithm()
- Specified by:
getAlgorithm
in classChecksumValue
-
getOffset
public long getOffset()
- Specified by:
getOffset
in classChecksumValue
-
getByteValue
public byte[] getByteValue()
- Specified by:
getByteValue
in classChecksumValue
-
getHexValue
public java.lang.String getHexValue()
- Specified by:
getHexValue
in classChecksumValue
-
-