|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.plugin.osgi.factory.transform.JarUtils
public final class JarUtils
Utility methods for getting stuff out of a jar.
Nested Class Summary | |
---|---|
static interface |
JarUtils.Extractor<T>
|
Method Summary | ||
---|---|---|
static void |
closeQuietly(JarFile jarFile)
Quietly close jar file. |
|
static
|
withJar(File file,
JarUtils.Extractor<T> extractor)
Extract something from a jar file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> T withJar(File file, JarUtils.Extractor<T> extractor)
Correctly opens and closes the Jar file. Must not lazily access the Jar as it has an open/closed state.
T
- the type of the thing to extractfile
- the file that is the jar contentsextractor
-
RuntimeException
- if there are problems accessing the jar contents.public static void closeQuietly(JarFile jarFile)
jarFile
- the file to close.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |