|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jpackit.util.JarUtils
public final class JarUtils
Misc utilities to work with jar archives.
Method Summary | |
---|---|
static void |
addFileToJar(java.util.jar.JarOutputStream jar,
java.io.InputStream file,
java.lang.String path)
Add file to jar with given path |
static boolean |
checkJarValidity(java.lang.String path)
Checks that file is valid jar archive |
static java.util.jar.JarFile |
getExecutingJar()
Tries to determine jar file that is used to run the application. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.util.jar.JarFile getExecutingJar() throws java.io.IOException, NotJarExecutionException
java.io.IOException
NotJarExecutionException
public static void addFileToJar(java.util.jar.JarOutputStream jar, java.io.InputStream file, java.lang.String path) throws java.io.IOException
jar
- output stream to write to jar filefile
- input stream to read from added filepath
- internal (inside jar) path, where new file will be placed
java.io.IOException
public static boolean checkJarValidity(java.lang.String path)
path
- full path to file
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |