|
|||||||||
| 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(JarInputStream jis,
JarHelper.Visitor visitor)
|
static void |
copy(InputStream in,
OutputStream out,
ByteBuffer byteBuffer)
Copies input to output. |
static InputStream |
makeJar(File dir,
Runnable action)
A utility method to make a JarInputStream out of the contents of a directory. |
static void |
write(JarInputStream jis,
JarOutputStream jos)
A utility method to help write content of a Jar input stream to a Jar output stream. |
static void |
write(URLConnection con,
OutputStream os,
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(JarInputStream jis,
JarHelper.Visitor visitor)
throws IOException
IOException
public static void write(URLConnection con,
OutputStream os,
Manifest m)
con - URLConnection to be used as inputos - Output stream to write tom - Manifest to be written out - can't be null
IOException
public static void write(JarInputStream jis,
JarOutputStream jos)
throws IOException
jis - input stream to read fromjos - output stream to write to
IOException
public static InputStream makeJar(File dir,
Runnable action)
throws IOException
dir - Directory which contains the exploded bitsaction - A runnable to be called after output has been written
IOException
public static void copy(InputStream in,
OutputStream out,
ByteBuffer byteBuffer)
throws IOException
in - out - byteBuffer -
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||