|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.io.net.RsyncLib
public class RsyncLib
Implementations of methods needed to implement the rsync algorithm. Not intended to replace rsync or be compatible with it, so watch out. There is at least one project (jarsync) intended to be compatible so go there if you want it. Rsync info is at http://rsync.samba.org.
| Constructor Summary | |
|---|---|
RsyncLib()
|
|
| Method Summary | |
|---|---|
static java.security.MessageDigest |
createDigest()
Get an MD5 MessageDigest object. |
static boolean |
digestsMatch(byte[] digest1,
byte[] digest2)
|
static short |
hash(int weakChecksum)
Generates a 16-bit hash for the given 32-bit weak checksum. |
static java.util.ArrayList |
listFiles(java.io.File rootDir)
Generate a list of file paths beneath a root dir. |
static int |
rollWeakChecksum(int checksum,
int oldByte,
int newByte,
int blocksize)
Update the given checksum in a rolling fashion. |
static byte[] |
strongChecksum(byte[] bytes,
int start,
int length)
Generate a 128-bit strong checksum on the given bytes. |
static int |
weakChecksum(byte[] bytes,
int start,
int length)
Generate a 32-bit weak checksum on the given bytes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RsyncLib()
| Method Detail |
|---|
public static short hash(int weakChecksum)
public static int weakChecksum(byte[] bytes,
int start,
int length)
public static int rollWeakChecksum(int checksum,
int oldByte,
int newByte,
int blocksize)
public static byte[] strongChecksum(byte[] bytes,
int start,
int length)
public static java.security.MessageDigest createDigest()
public static boolean digestsMatch(byte[] digest1,
byte[] digest2)
public static java.util.ArrayList listFiles(java.io.File rootDir)
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||