|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvoldemort.store.readonly.checksum.CheckSum
public abstract class CheckSum
Nested Class Summary | |
---|---|
static class |
CheckSum.CheckSumType
|
Constructor Summary | |
---|---|
CheckSum()
|
Method Summary | |
---|---|
static int |
checkSumLength(CheckSum.CheckSumType type)
|
static CheckSum.CheckSumType |
fromString(java.lang.String input)
|
abstract byte[] |
getCheckSum()
Get the checkSum of the buffer till now, after which buffer is reset |
static CheckSum |
getInstance(CheckSum.CheckSumType type)
|
static CheckSum |
getInstance(java.lang.String algorithm)
|
abstract void |
reset()
Reset the checksum generator |
static java.lang.String |
toString(CheckSum.CheckSumType type)
|
void |
update(byte[] input)
Update the checksum buffer to include input |
abstract void |
update(byte[] input,
int startIndex,
int length)
Update the checksum buffer to include input with startIndex and length. |
void |
update(int number)
Update the underlying buffer using the integer |
void |
update(short number)
Update the underlying buffer using the short |
byte[] |
updateAndGetCheckSum(byte[] input,
int startIndex,
int length)
Update and get checksum + reset the digest for next use |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CheckSum()
Method Detail |
---|
public abstract void update(byte[] input, int startIndex, int length)
input
- startIndex
- length
- public abstract byte[] getCheckSum()
public abstract void reset()
public byte[] updateAndGetCheckSum(byte[] input, int startIndex, int length)
input
- The input byte arraystartIndex
- The index to start reading fromlength
- The number of bytes to read
public void update(int number)
number
- number to be stored in checksum bufferpublic void update(short number)
number
- number to be stored in checksum bufferpublic void update(byte[] input)
input
- bytes added to the bufferpublic static CheckSum getInstance(CheckSum.CheckSumType type)
public static int checkSumLength(CheckSum.CheckSumType type)
public static java.lang.String toString(CheckSum.CheckSumType type)
public static CheckSum.CheckSumType fromString(java.lang.String input)
public static CheckSum getInstance(java.lang.String algorithm)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |