Package org.apache.xmlbeans.impl.common
Class JarHelper
java.lang.Object
org.apache.xmlbeans.impl.common.JarHelper
public class JarHelper extends Object
Provides utility services for jarring and unjarring files and directories.
Note that a given instance of JarHelper is not threadsafe with respect to
multiple jar operations.
- Author:
- Patrick Calahan
-
Constructor Summary
Constructors Constructor Description JarHelper()
Instantiates a new JarHelper. -
Method Summary
Modifier and Type Method Description void
jarDir(File dirOrFile2Jar, File destJar)
Jars a given directory or single file into a JarOutputStream.static void
main(String[] args)
void
setVerbose(boolean b)
void
unjar(InputStream in, File destDir)
Given an InputStream on a jar file, unjars the contents into the given directory.void
unjarDir(File jarFile, File destDir)
Unjars a given jar file into a given directory.
-
Constructor Details
-
JarHelper
public JarHelper()Instantiates a new JarHelper.
-
-
Method Details
-
jarDir
Jars a given directory or single file into a JarOutputStream.- Throws:
IOException
-
unjarDir
Unjars a given jar file into a given directory.- Throws:
IOException
-
unjar
Given an InputStream on a jar file, unjars the contents into the given directory.- Throws:
IOException
-
setVerbose
public void setVerbose(boolean b) -
main
- Throws:
IOException
-