|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.glassfish.osgijavaeebase.JarHelper
public class JarHelper
A utility class to help reading/writing content of JarFile from/to stream.
| Nested Class Summary | |
|---|---|
static interface |
JarHelper.Visitor
|
| Constructor Summary | |
|---|---|
JarHelper()
|
|
| Method Summary | |
|---|---|
static void |
accept(java.util.jar.JarInputStream jis,
JarHelper.Visitor visitor)
|
static void |
copy(java.io.InputStream in,
java.io.OutputStream out,
java.nio.ByteBuffer byteBuffer)
Copies input to output. |
static java.io.InputStream |
makeJar(java.io.File dir,
java.lang.Runnable action)
A utility method to make a JarInputStream out of the contents of a directory. |
static void |
write(java.util.jar.JarInputStream jis,
java.util.jar.JarOutputStream jos)
A utility method to help write content of a Jar input stream to a Jar output stream. |
static void |
write(java.net.URLConnection con,
java.io.OutputStream os,
java.util.jar.Manifest m)
A utility method which reads contents from a URLConnection and writes it out a Jar output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JarHelper()
| Method Detail |
|---|
public static void accept(java.util.jar.JarInputStream jis,
JarHelper.Visitor visitor)
throws java.io.IOException
java.io.IOException
public static void write(java.net.URLConnection con,
java.io.OutputStream os,
java.util.jar.Manifest m)
con - URLConnection to be used as inputos - Output stream to write tom - Manifest to be written out - can't be null
java.io.IOException
public static void write(java.util.jar.JarInputStream jis,
java.util.jar.JarOutputStream jos)
throws java.io.IOException
jis - input stream to read fromjos - output stream to write to
java.io.IOException
public static java.io.InputStream makeJar(java.io.File dir,
java.lang.Runnable action)
throws java.io.IOException
dir - Directory which contains the exploded bitsaction - A runnable to be called after output has been written
java.io.IOException
public static void copy(java.io.InputStream in,
java.io.OutputStream out,
java.nio.ByteBuffer byteBuffer)
throws java.io.IOException
in - out - byteBuffer -
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||