public class Delta
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_CHUNK_SIZE
Default size of 16.
|
Constructor and Description |
---|
Delta()
Constructs a new Delta.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
compute(byte[] source,
byte[] target)
Compares the source bytes with target bytes, returning output.
|
void |
compute(byte[] source,
byte[] target,
java.io.OutputStream output)
Compares the source bytes with target bytes, writing to output.
|
void |
compute(byte[] sourceBytes,
java.io.InputStream inputStream,
DiffWriter diffWriter)
Compares the source bytes with target input, writing to output.
|
void |
compute(java.io.File sourceFile,
java.io.File targetFile,
DiffWriter output)
Compares the source file with a target file, writing to output.
|
void |
compute(SeekableSource seekSource,
java.io.InputStream targetIS,
DiffWriter output)
Compares the source with a target, writing to output.
|
static void |
main(java.lang.String[] argv)
Creates a patch using file names.
|
void |
setChunkSize(int size)
Sets the chunk size used.
|
public static final int DEFAULT_CHUNK_SIZE
Use a size like 64 or 128 for large files.
public Delta()
public void setChunkSize(int size)
size
- public void compute(byte[] source, byte[] target, java.io.OutputStream output) throws java.io.IOException
java.io.IOException
public byte[] compute(byte[] source, byte[] target) throws java.io.IOException
java.io.IOException
public void compute(byte[] sourceBytes, java.io.InputStream inputStream, DiffWriter diffWriter) throws java.io.IOException
java.io.IOException
public void compute(java.io.File sourceFile, java.io.File targetFile, DiffWriter output) throws java.io.IOException
output
- will be closedjava.io.IOException
public void compute(SeekableSource seekSource, java.io.InputStream targetIS, DiffWriter output) throws java.io.IOException
output
- will be closedjava.io.IOException
public static void main(java.lang.String[] argv) throws java.lang.Exception
java.lang.Exception