|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.metastatic.rsync.Matcher
Methods for performing the checksum search. The result of a search
is a List
of Delta
objects that, when
applied to a method in Rebuilder
, will reconstruct the new
version of the data.
Field Summary | |
---|---|
protected int |
chunkSize
The size of allocated byte arrays. |
protected List |
deltas
The list of deltas being built. |
protected MatcherStream |
matcher
The underlying matcher stream. |
Constructor Summary | |
---|---|
Matcher(Configuration config)
Create a matcher with the specified configuration. |
Method Summary | |
---|---|
List |
hashSearch(List sums,
byte[] buf)
Search the given byte buffer. |
List |
hashSearch(List sums,
byte[] buf,
int off,
int len)
Search a portion of a byte buffer. |
List |
hashSearch(List sums,
File f)
Search a file. |
List |
hashSearch(List sums,
InputStream in)
Search an input stream. |
List |
hashSearch(List sums,
String filename)
Search a file by name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final List deltas
protected final MatcherStream matcher
protected final int chunkSize
Constructor Detail |
public Matcher(Configuration config)
config
- The Configuration
for this Matcher.Method Detail |
public List hashSearch(List sums, byte[] buf)
sums
- The checksums to search for.buf
- The data buffer to search.
Delta
s derived from this search.public List hashSearch(List sums, byte[] buf, int off, int len)
sums
- The checksums to search for.buf
- The data buffer to search.off
- The offset in buf
to begin.len
- The number of bytes to search from buf
.
Delta
s derived from this search.public List hashSearch(List sums, String filename) throws IOException
sums
- The checksums to search for.filename
- The name of the file to search.
IOException
- If filename cannot be read.public List hashSearch(List sums, File f) throws IOException
sums
- The checksums to search for.f
- The file to search.
Delta
s derived from this search.
IOException
- If f cannot be read.public List hashSearch(List sums, InputStream in) throws IOException
in
- The input stream to search.
Delta
s derived from this search.
IOException
- If an exception occurs while reading.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |