|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.metastatic.rsync.ChecksumPair
A pair of weak and strong checksums for use with the Rsync algorithm. The weak "rolling" checksum is typically a 32-bit sum derived from the Adler32 algorithm; the strong checksum is usually a 128-bit MD4 checksum.
| Constructor Summary | |
|---|---|
ChecksumPair(int weak,
byte[] strong)
Create a new checksum pair with no associated offset. |
|
ChecksumPair(int weak,
byte[] strong,
long offset)
Create a new checksum pair with no length or sequence fields. |
|
ChecksumPair(int weak,
byte[] strong,
long offset,
int length,
int seq)
Create a new checksum pair. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
We define equality for this object as equality between two weak sums and equality between two strong sums. |
int |
getLength()
Return the length of the data for which this checksum pair was generated. |
long |
getOffset()
Return the offset from where this checksum pair was generated. |
int |
getSequence()
Return the sequence number of this checksum pair, if any. |
byte[] |
getStrong()
Get the strong checksum. |
int |
getWeak()
Get the weak checksum. |
int |
hashCode()
|
String |
toString()
Returns a String representation of this pair. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ChecksumPair(int weak,
byte[] strong,
long offset,
int length,
int seq)
weak - The weak, rolling checksum.strong - The strong checksum.offset - The offset at which this checksum was computed.length - The length of the data over which this sum was
computed.seq - The sequence number of this checksum pair.
public ChecksumPair(int weak,
byte[] strong,
long offset)
weak - The weak checksum.strong - The strong checksum.offset - The offset at which this checksum was computed.
public ChecksumPair(int weak,
byte[] strong)
weak - The weak checksum.strong - The strong checksum.| Method Detail |
public int getWeak()
public byte[] getStrong()
public long getOffset()
public int getLength()
public int getSequence()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectobj - The Object to test.
public String toString()
toString in class Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||