com.infoengine.administration.packaging
Class PackageComparator
java.lang.Object
com.infoengine.administration.packaging.PackageComparator
- public class PackageComparator
- extends Object
Constructor Summary |
PackageComparator(File existingPackage,
File newPackage)
Constructs a new Package Comparator to compare to package archives. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MEM_MAP_SIZE
private static final int MEM_MAP_SIZE
- See Also:
- Constant Field Values
existingPackage
File existingPackage
newPackage
File newPackage
utils
JarUtils utils
PackageComparator
public PackageComparator(File existingPackage,
File newPackage)
- Constructs a new Package Comparator to compare to package archives.
- Parameters:
existingPackage
- - An existing package *must* have either ptctar or ptcdar extensionnewPackage
- - A new package could be named anything (probably temporary file).
compare
public boolean compare()
throws IOException
- Performs the comparison.
- Returns:
- True if packages are equivalent.
- Throws:
IOException
- If an exception occurs while reading the jars.
compareJars
private boolean compareJars(File jar1,
File jar2)
throws IOException
- Throws:
IOException
compareDirectories
private boolean compareDirectories(File dir1,
File dir2)
throws IOException
- Throws:
IOException
compareFiles
private boolean compareFiles(File f1,
File f2)
throws IOException
- Throws:
IOException
findByName
private File findByName(File[] files,
File f)
delTree
private static void delTree(File dir)
main
public static void main(String[] args)
throws Exception
- Throws:
Exception