|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jonas_ws.wsgen.JarManager
Manage a jar file.
Field Summary | |
protected java.util.Hashtable |
jarEntries
|
protected java.lang.String |
jarFileName
|
protected java.util.jar.JarOutputStream |
jos
|
protected static org.objectweb.util.monolog.api.Logger |
logger
The logger to use |
protected java.io.File |
tempJar
|
protected java.util.Enumeration |
tjEntries
|
Constructor Summary | |
JarManager(java.lang.String jarFilename)
Build a new instance of a JarManager. |
Method Summary | |
void |
addDir(java.io.File dir)
Add all Files contained in a directory in the current jar file. |
void |
addDir(java.lang.String base,
java.io.File dir)
Add all Files contained in a directory in the current jar file at the specified entryName location. |
void |
addFile(java.lang.String entryName,
java.io.File file)
Add a new File in the current jar file. |
void |
close()
|
protected static java.lang.String |
getSAXMsg(java.lang.String fileName,
org.xml.sax.SAXParseException exception,
java.lang.String msg)
build a message from SAX Exception in a consistent style, consistent with emacs compile mode (same as grep, cc, javac, etc). |
protected boolean |
isNewFile()
Return true if a new jar file has been created. |
protected void |
open()
Open the output stream on the jar file and create a save of the jar. |
protected void |
save()
add all jar entries in the jar file. |
protected void |
writeEntry(java.util.zip.ZipEntry ze,
java.io.InputStream is)
write a new entry in the jar output stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String jarFileName
protected java.util.jar.JarOutputStream jos
protected java.io.File tempJar
protected java.util.Enumeration tjEntries
protected java.util.Hashtable jarEntries
protected static org.objectweb.util.monolog.api.Logger logger
Constructor Detail |
public JarManager(java.lang.String jarFilename) throws WsGenException
jarFilename
- the name of the jar file
that we want to manage.
WsGenException
- if the war file doesn't exist.Method Detail |
public void addDir(java.io.File dir) throws WsGenException
dir
- the directory to add
WsGenException
public void addDir(java.lang.String base, java.io.File dir) throws WsGenException
base
- where to put directory files in the jardir
- the directory to add
WsGenException
public void addFile(java.lang.String entryName, java.io.File file) throws WsGenException
entryName
- where to put the file in the jarfile
- the file to add
WsGenException
protected static java.lang.String getSAXMsg(java.lang.String fileName, org.xml.sax.SAXParseException exception, java.lang.String msg)
fileName
- name of the fileexception
- the SAX exceptionmsg
- the string message
protected boolean isNewFile()
protected void writeEntry(java.util.zip.ZipEntry ze, java.io.InputStream is) throws WsGenException
ze
- the zip entry to add.is
- the input stream to write.
WsGenException
protected void open() throws WsGenException
WsGenException
protected void save() throws WsGenException
WsGenException
public void close() throws WsGenException
WsGenException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |