Package org.jrd.backend.data.cli
Class InMemoryJar
- java.lang.Object
-
- org.jrd.backend.data.cli.InMemoryJar
-
public class InMemoryJar extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description InMemoryJar()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFile(byte[] body, java.lang.String fqn)private static voidaddFile(java.util.jar.JarOutputStream target, byte[] body, java.lang.String fqn)voidaddToManifest(java.lang.String key, java.lang.String value)voidclose()voidopen()java.util.jar.JarOutputStreamopenJar(java.io.OutputStream os)java.io.Filesave()voidsave(java.io.File f)voidsetMainClass(java.lang.String mainFqn)voidstartManifest()byte[]toBytes()
-
-
-
Method Detail
-
startManifest
public void startManifest()
-
setMainClass
public void setMainClass(java.lang.String mainFqn)
-
addToManifest
public void addToManifest(java.lang.String key, java.lang.String value)
-
openJar
public java.util.jar.JarOutputStream openJar(java.io.OutputStream os) throws java.io.IOException- Throws:
java.io.IOException
-
addFile
private static void addFile(java.util.jar.JarOutputStream target, byte[] body, java.lang.String fqn) throws java.io.IOException- Throws:
java.io.IOException
-
addFile
public void addFile(byte[] body, java.lang.String fqn) throws java.io.IOException- Throws:
java.io.IOException
-
open
public void open() throws java.io.IOException- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Throws:
java.io.IOException
-
save
public java.io.File save() throws java.io.IOException- Throws:
java.io.IOException
-
save
public void save(java.io.File f) throws java.io.IOException- Throws:
java.io.IOException
-
toBytes
public byte[] toBytes() throws java.io.IOException- Throws:
java.io.IOException
-
-