- java.lang.Object
-
- de.carne.io.MessageDigestChecksum
-
- All Implemented Interfaces:
Checksum
- Direct Known Subclasses:
MD5Checksum,SHA256Checksum
public abstract class MessageDigestChecksum extends java.lang.Object implements Checksum
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMessageDigestChecksum(java.security.MessageDigest digest)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getValue()Finalizes the checksum generation, returns the result and resets the generator.voidreset()Resets the generator to it's start state.voidupdate(byte b)Feeds a single byte into the generator.voidupdate(byte[] bs)Feeds a byte array into the generator.voidupdate(byte[] bs, int off, int len)Feeds a byte array into the generator.voidupdate(java.nio.ByteBuffer bs)Feeds a ByteBuffer into the generator.
-
-
-
Method Detail
-
reset
public void reset()
Description copied from interface:ChecksumResets the generator to it's start state.
-
update
public void update(byte b)
Description copied from interface:ChecksumFeeds a single byte into the generator.
-
update
public void update(byte[] bs)
Description copied from interface:ChecksumFeeds a byte array into the generator.
-
update
public void update(byte[] bs, int off, int len)Description copied from interface:ChecksumFeeds a byte array into the generator.
-
update
public void update(java.nio.ByteBuffer bs)
Description copied from interface:ChecksumFeeds a ByteBuffer into the generator.
-
-