public class JarHelper extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
JarHelper.Visitor |
| Constructor and Description |
|---|
JarHelper() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static void accept(JarInputStream jis, JarHelper.Visitor visitor) throws IOException
IOExceptionpublic 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 nullIOExceptionpublic static void write(JarInputStream jis, JarOutputStream jos) throws IOException
jis - input stream to read fromjos - output stream to write toIOExceptionpublic 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 writtenIOExceptionpublic static void copy(InputStream in, OutputStream out, ByteBuffer byteBuffer) throws IOException
in - out - byteBuffer - IOExceptionCopyright © 2017–2019 Eclipse Foundation. All rights reserved.