|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.spardat.xma.xdelta.JarDelta
public class JarDelta
This class calculates the binary difference of two zip files by applying Delta
to all files contained in both zip files. All these binary differences are stored in the output zip file.
New files are simply copied to the output zip file. Additionally all files contained in the target zip
file are listed in META-INF/file.list
.
Use JarPatcher
to apply the output zip file.
Constructor Summary | |
---|---|
JarDelta()
|
Method Summary | |
---|---|
void |
computeDelta(ZipFile source,
ZipFile target,
ZipOutputStream output)
Computes the binary differences of two zip files. |
boolean |
equal(byte[] source,
byte[] target)
Test if the content of two byte arrays is completly identical. |
static void |
main(String[] args)
Main method to make computeDelta(ZipFile, ZipFile, ZipOutputStream) available at
the command line.usage JarDelta source target output |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JarDelta()
Method Detail |
---|
public void computeDelta(ZipFile source, ZipFile target, ZipOutputStream output) throws IOException
com.nothome.delta.Delta#computeDelta(com.nothome.delta.SeekableSource, InputStream, int, DiffWriter)
.
If the files are equal, nothing is written to the output for them.
Files contained only in target and files to small for Delta
are copied to output.
Files contained only in source are ignored.
At last a list of all files contained in target is written to META-INF/file.list
in output.
source
- the original zip filetarget
- a modification of the original zip fileoutput
- the zip file where the patches have to be written to
IOException
- if an error occures reading or writing any entry in a zip filepublic boolean equal(byte[] source, byte[] target)
public static void main(String[] args) throws IOException
computeDelta(ZipFile, ZipFile, ZipOutputStream)
available at
the command line.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |