Package org.apache.xmlbeans.impl.common
Class JarHelper
- java.lang.Object
-
- org.apache.xmlbeans.impl.common.JarHelper
-
public class JarHelper extends java.lang.ObjectProvides 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.
-
-
Constructor Summary
Constructors Constructor Description JarHelper()Instantiates a new JarHelper.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidjarDir(java.io.File dirOrFile2Jar, java.io.File destJar)Jars a given directory or single file into a JarOutputStream.static voidmain(java.lang.String[] args)voidsetVerbose(boolean b)voidunjar(java.io.InputStream in, java.io.File destDir)Given an InputStream on a jar file, unjars the contents into the given directory.voidunjarDir(java.io.File jarFile, java.io.File destDir)Unjars a given jar file into a given directory.
-
-
-
Method Detail
-
jarDir
public void jarDir(java.io.File dirOrFile2Jar, java.io.File destJar) throws java.io.IOExceptionJars a given directory or single file into a JarOutputStream.- Throws:
java.io.IOException
-
unjarDir
public void unjarDir(java.io.File jarFile, java.io.File destDir) throws java.io.IOExceptionUnjars a given jar file into a given directory.- Throws:
java.io.IOException
-
unjar
public void unjar(java.io.InputStream in, java.io.File destDir) throws java.io.IOExceptionGiven an InputStream on a jar file, unjars the contents into the given directory.- Throws:
java.io.IOException
-
setVerbose
public void setVerbose(boolean b)
-
main
public static void main(java.lang.String[] args) throws java.io.IOException- Throws:
java.io.IOException
-
-