|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.infoengine.util.JarUtils
Field Summary | |
private Vector |
jarListeners
|
Constructor Summary | |
JarUtils()
Create an instance of JarUtils |
Method Summary | |
void |
addJarListener(JarListener listener)
Add an jarListener to be notified of jar events. |
private void |
fireJarEvent(String path)
|
private void |
fireUnjarEvent(File f,
boolean ow)
|
void |
jar(File jar,
File[] files)
|
void |
jar(File jar,
File[] files,
File relativeTo)
|
void |
jar(File jar,
Map files)
|
private void |
jar(JarOutputStream jos,
File f,
File relativeTo,
Vector paths)
|
private void |
list(File jf)
doesn't actually unjar simply generates one unjarred event per entry in the jar |
static void |
main(String[] args)
|
private String |
normalizePath(File f,
File relativeTo)
force paths to look unix like and force / on the end of directory paths |
void |
removeJarListener(JarListener listener)
Unregister a jarListener so it's no longer notified of jar events. |
File |
tempUnjar(File jf)
unjars a jar to a temporary location (deleteOnExit) and returns the directory |
void |
unjar(File jf)
unjar a file to the current directory |
void |
unjar(File jf,
File dest)
Unjars a jar to a specified location. |
void |
unjar(File jf,
File dest,
boolean deleteOnExit)
Unjars a jar to a specified location. |
void |
unjar(File jf,
File dest,
boolean deleteOnExit,
boolean overwrite)
Unjars a jar to a specified location. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private Vector jarListeners
Constructor Detail |
public JarUtils()
Method Detail |
public void addJarListener(JarListener listener)
listener
- public void removeJarListener(JarListener listener)
listener
- public void unjar(File jf) throws IOException
jf
- the file to unjar
IOException
public File tempUnjar(File jf) throws IOException
jf
- the file to unjar
IOException
public void unjar(File jf, File dest) throws IOException
jf
- the file to unjardest
- the destination directory. if null the current directory.
IOException
public void unjar(File jf, File dest, boolean deleteOnExit) throws IOException
jf
- the file to unjardest
- the destination directory. if null the current directory.deleteOnExit
- should the files persist when the VM exists?
IOException
public void unjar(File jf, File dest, boolean deleteOnExit, boolean overwrite) throws IOException
jf
- the file to unjardest
- the destination directory. if null the current directory.deleteOnExit
- should the files persist when the VM exists?overwrite
- should existing files be overwritten?
IOException
private void list(File jf) throws IOException
jf
- the jar file
IOException
private void fireUnjarEvent(File f, boolean ow)
public void jar(File jar, File[] files, File relativeTo) throws IOException
IOException
public void jar(File jar, Map files) throws IOException
jar
- - the jar filefiles
- - map of files, keys must be relative directories, values must be File []
IOException
public void jar(File jar, File[] files) throws IOException
IOException
private void jar(JarOutputStream jos, File f, File relativeTo, Vector paths) throws IOException
IOException
private void fireJarEvent(String path)
private String normalizePath(File f, File relativeTo)
public static void main(String[] args) throws Exception
Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |