-
- All Known Implementing Classes:
MD5Checksum,MessageDigestChecksum,SHA256Checksum
public interface ChecksumInterface for any kind of checksum generator.
-
-
Method Summary
All Methods Instance Methods Abstract 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
void reset()
Resets the generator to it's start state.
-
update
void update(byte b)
Feeds a single byte into the generator.- Parameters:
b- the byte to feed.
-
update
void update(byte[] bs)
Feeds a byte array into the generator.- Parameters:
bs- the byte array to feed.
-
update
void update(byte[] bs, int off, int len)Feeds a byte array into the generator.- Parameters:
bs- the byte array to feed.off- the first byte to feed.len- the number of bytes to feed.
-
update
void update(java.nio.ByteBuffer bs)
Feeds a ByteBuffer into the generator.- Parameters:
bs- the ByteBuffer to feed.
-
getValue
byte[] getValue()
Finalizes the checksum generation, returns the result and resets the generator.- Returns:
- the generated checksum.
-
-