|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.openejb.util.JarExtractor
public class JarExtractor
Field Summary | |
---|---|
static Logger |
logger
|
Constructor Summary | |
---|---|
JarExtractor()
|
Method Summary | |
---|---|
static boolean |
copy(java.io.File src,
java.io.File dest)
Copy the specified file or directory to the destination. |
static boolean |
delete(java.io.File dir)
Delete the specified directory, including all of its contents and subdirectories recursively. |
static boolean |
deleteDir(java.io.File dir)
Delete the specified directory, including all of its contents and subdirectories recursively. |
static void |
extract(java.io.File file,
java.io.File destinationDir)
Extract the jar file into the specifiec destination directory. |
static java.io.File |
extract(java.io.File file,
java.lang.String pathname)
Extract the Jar file into an unpacked directory structure, and return the absolute pathname to the extracted directory. |
protected static java.io.File |
extract(java.io.InputStream input,
java.io.File docBase,
java.lang.String name)
Extract the specified input stream into the specified directory, creating a file named from the specified relative path. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Logger logger
Constructor Detail |
---|
public JarExtractor()
Method Detail |
---|
public static java.io.File extract(java.io.File file, java.lang.String pathname) throws java.io.IOException
file
- Jar file to unpackpathname
- Context path name for web application
java.lang.IllegalArgumentException
- if this is not a "jar:" URL
java.io.IOException
- if an input/output error was encountered
during expansionpublic static void extract(java.io.File file, java.io.File destinationDir) throws java.io.IOException
file
- jar file to unpackdestinationDir
- the directory in which the jar will be unpacked; must not exist
java.io.IOException
- if an input/output error was encountered during expansionpublic static boolean copy(java.io.File src, java.io.File dest)
src
- File object representing the sourcedest
- File object representing the destinationpublic static boolean delete(java.io.File dir)
dir
- File object representing the directory to be deletedpublic static boolean deleteDir(java.io.File dir)
dir
- File object representing the directory to be deletedprotected static java.io.File extract(java.io.InputStream input, java.io.File docBase, java.lang.String name) throws java.io.IOException
input
- InputStream to be copieddocBase
- Document base directory into which we are extractingname
- Relative pathname of the file to be created
java.io.IOException
- if an input/output error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |