|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nothome.delta.text.Delta
public class Delta
Class for computing deltas against a source. The source file is read by blocks and a hash is computed per block. Then the target is scanned for matching blocks.
Essentially a duplicate of com.nothome.delta.Delta for character streams.
Field Summary | |
---|---|
static int |
DEFAULT_CHUNK_SIZE
Default size of 16. |
Constructor Summary | |
---|---|
Delta()
|
Method Summary | |
---|---|
String |
compute(CharSequence source,
CharSequence target)
Compares the source bytes with target bytes, returning differences. |
void |
compute(CharSequence source,
CharSequence target,
Writer output)
Compares the source bytes with target bytes, writing to output. |
void |
compute(SeekableSource seekSource,
Reader targetIS,
DiffTextWriter output)
Compares the source with a target, writing to output. |
static void |
main(String[] s)
Creates a patch with file names. |
void |
setChunkSize(int size)
Sets the chunk size used. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_CHUNK_SIZE
Use a size like 64 or 128 for large files.
Constructor Detail |
---|
public Delta()
Method Detail |
---|
public void setChunkSize(int size)
size
- public void compute(CharSequence source, CharSequence target, Writer output) throws IOException
IOException
public String compute(CharSequence source, CharSequence target) throws IOException
IOException
public void compute(SeekableSource seekSource, Reader targetIS, DiffTextWriter output) throws IOException
targetIS
- second file to compare withoutput
- diff output
IOException
- if diff generation failspublic static void main(String[] s) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |