Package org.eclipse.jetty.toolchain.test
Class JAR
- java.lang.Object
-
- org.eclipse.jetty.toolchain.test.JAR
-
public final class JAR extends java.lang.ObjectBasic functions for working with JAR files in test cases.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateJAR()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidclose(java.util.jar.JarFile jar)Close a JAR file.static voidcreate(java.io.File srcDir, java.io.File jarFile)Create a JAR file out of the contents of a specific directory (recursively)private static voidpackDir(java.io.File baseDir, java.io.File srcDir, java.util.jar.JarOutputStream jarout)static voidunpack(java.io.File jarFile, java.io.File destDir)Unpack JAR file into destination directory.private static voidunpack(java.util.jar.JarFile jar, java.util.jar.JarEntry entry, java.io.File destFile)
-
-
-
Method Detail
-
unpack
public static void unpack(java.io.File jarFile, java.io.File destDir) throws java.io.IOExceptionUnpack JAR file into destination directory.- Parameters:
jarFile- the jar file to unpackdestDir- the destination directory to unpack into- Throws:
java.io.IOException- if unable to unpack jar file.
-
unpack
private static void unpack(java.util.jar.JarFile jar, java.util.jar.JarEntry entry, java.io.File destFile) throws java.io.IOException- Throws:
java.io.IOException
-
close
public static void close(java.util.jar.JarFile jar)
Close a JAR file.- Parameters:
jar- the JarFile to close
-
create
public static void create(java.io.File srcDir, java.io.File jarFile) throws java.io.IOExceptionCreate a JAR file out of the contents of a specific directory (recursively)- Parameters:
srcDir- the source directoryjarFile- the destination jar file to create- Throws:
java.io.IOException- if unable to create the jar file, or read the source directory
-
packDir
private static void packDir(java.io.File baseDir, java.io.File srcDir, java.util.jar.JarOutputStream jarout) throws java.io.IOException- Throws:
java.io.IOException
-
-