public class JdrZipFile extends Object
| Constructor and Description |
|---|
JdrZipFile(JdrEnvironment env) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(InputStream is,
String path)
Adds the contents of the
InputStream to the path in the zip. |
void |
add(String content,
String path)
Adds content to the zipfile at path
path is prepended with the directory reserved for generated text files in JDR
|
void |
add(org.jboss.vfs.VirtualFile file,
InputStream is)
Adds the content of the
InputStream to the zip in a location that mirrors where file is located. |
void |
addAsString(InputStream stream,
String path)
Adds content to the zipfile at path
path is prepended with the directory reserved for generated text files in JDR
|
void |
addLog(String content,
String logName)
Adds content to the zipfile in a file named logName
path is prepended with the directory reserved for JDR log files
|
void |
close() |
String |
name() |
public JdrZipFile(JdrEnvironment env) throws Exception
Exceptionpublic String name()
public void add(InputStream is, String path)
InputStream to the path in the zip.
This method allows for absolute control of the destination of the content to be stored.
It is not common to use this method.is - content to writepath - destination to write to in the zip filepublic void add(org.jboss.vfs.VirtualFile file,
InputStream is)
throws Exception
InputStream to the zip in a location that mirrors where file is located.
For example if file is at /tmp/foo/bar and $JBOSS_HOME is tmp then the destination will be JBOSSHOME/foo/barfile - VirtualFile where metadata is read fromis - content to write to the zip fileExceptionpublic void add(String content, String path) throws Exception
content - path - Exceptionpublic void addAsString(InputStream stream, String path) throws Exception
stream - path - Exceptionpublic void addLog(String content, String logName) throws Exception
content - logName - ExceptionCopyright © 2018 JBoss by Red Hat. All rights reserved.