|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.metastatic.rsync.Generator
Checksum generation methods.
| Field Summary | |
|---|---|
protected Configuration |
config
Our configuration. |
| Constructor Summary | |
|---|---|
Generator(Configuration config)
|
|
| Method Summary | |
|---|---|
ChecksumPair |
generateSum(byte[] buf,
int off,
int len,
long fileOffset)
Generate a sum pair for a portion of a byte array. |
ChecksumPair |
generateSum(byte[] buf,
long fileOffset)
Generate a sum pair for an entire byte array. |
List |
generateSums(byte[] buf)
Generate checksums over an entire byte array, with a base offset of 0. |
List |
generateSums(byte[] buf,
int off,
int len)
Generate checksums over a portion of a byte array, with a base offset of 0. |
List |
generateSums(byte[] buf,
int off,
int len,
long baseOffset)
Generate checksums over a portion of abyte array, with a specified base offset. |
List |
generateSums(byte[] buf,
long baseOffset)
Generate checksums over an entire byte array, with a specified base offset. |
List |
generateSums(File f)
Generate checksums for an entire file. |
List |
generateSums(InputStream in)
Generate checksums for an InputStream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected final Configuration config
| Constructor Detail |
public Generator(Configuration config)
| Method Detail |
public List generateSums(byte[] buf)
buf - The byte buffer to checksum.
List of ChecksumPairs
generated from the array.generateSums(byte[],int,int,long)
public List generateSums(byte[] buf,
int off,
int len)
buf - The byte array to checksum.off - The offset in buf to begin.len - The number of bytes to checksum.
List of ChecksumPairs
generated from the array.generateSums(byte[],int,int,long)
public List generateSums(byte[] buf,
long baseOffset)
baseOffset is added to the offset
stored in each ChecksumPair.
buf - The byte array to checksum.baseOffset - The offset from whence this byte array came.
List of ChecksumPairs
generated from the array.generateSums(byte[],int,int,long)
public List generateSums(byte[] buf,
int off,
int len,
long baseOffset)
baseOffset is added to the offset
stored in each ChecksumPair.
buf - The byte array to checksum.off - From whence in buf to start.len - The number of bytes to check in
buf.baseOffset - The offset from whence this byte array came.
List of ChecksumPairs
generated from the array.
public List generateSums(File f)
throws IOException
f - The File to checksum.
List of ChecksumPairs
generated from the file.
IOException - if f cannot be read from.
public List generateSums(InputStream in)
throws IOException
in - The InputStream to checksum.
List of ChecksumPairs
generated from the bytes read.
IOException - if reading fails.
public ChecksumPair generateSum(byte[] buf,
long fileOffset)
buf - The byte array to checksum.fileOffset - The offset in the original file from whence
this block came.
ChecksumPair for this byte array.
public ChecksumPair generateSum(byte[] buf,
int off,
int len,
long fileOffset)
buf - The byte array to checksum.off - Where in buf to start.len - How many bytes to checksum.fileOffset - The original offset of this byte array.
ChecksumPair for this byte array.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||