public class JarFactory extends Object
| Constructor and Description |
|---|
JarFactory(String dir)
This object provides utility methods to manipulate DOM tree.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getEntry(ZipFile jarFile,
ZipEntry entry)
Gets one file
entry from jarFile. |
void |
unJar(File jarFile)
Unjars a file.
|
void |
unJar(ZipFile jar)
Unjars a file.
|
String |
zip(String zipFileName)
This method is used to create a zip file with the contents of this directory and
keep it in the parent dir
|
public JarFactory(String dir)
dir - Directory to unjarpublic void unJar(File jarFile) throws IOException, JarException, ZipException
jarFile - File to be unjaredIOException - if error trying to read entry.JarException - if error trying to read jar file.ZipExceptionpublic void unJar(ZipFile jar) throws IOException, ZipException
jar - JarFile to be unjaredIOException - if error trying to read entry.JarException - if error trying to read jar file.ZipExceptionpublic String getEntry(ZipFile jarFile, ZipEntry entry) throws IOException
entry from jarFile.jarFile - the JAR file reference to retrieve entry from.entry - the file from the JAR to extract.IOException - if error trying to read entry.public String zip(String zipFileName) throws IOException
zipFileName - the name of the zip fileIOException - if a zip could not be createdCopyright © 2011-2016 OpenESB Community. All Rights Reserved.