|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.grizzly.util.ExpandJar
public class ExpandJar
Expand out a jar. Adapted from Tomcat's org.apache.catalina.startup.ExpendWar classes
Constructor Summary | |
---|---|
ExpandJar()
|
Method Summary | |
---|---|
static boolean |
copy(File src,
File dest)
Copy the specified file or directory to the destination. |
static boolean |
delete(File dir)
Delete the specified directory, including all of its contents and subdirectories recursively. |
static boolean |
deleteDir(File dir)
Delete the specified directory, including all of its contents and subdirectories recursively. |
protected static void |
expand(InputStream input,
File docBase,
String name)
Expand the specified input stream into the specified directory, creating a file named from the specified relative path. |
static String |
expand(URL jar)
Expand the jar file found at the specified URL into an unpacked directory structure, and return the absolute pathname to the expanded directory. |
static String |
expand(URL jar,
String pathname,
String dirname)
Expand the jar file found at the specified URL into an unpacked directory structure, and return the absolute pathname to the expanded directory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExpandJar()
Method Detail |
---|
public static String expand(URL jar) throws IOException
jar
- URL of the web application archive to be expanded
(must start with "jar:")
IllegalArgumentException
- if this is not a "jar:" URL
IOException
- if an input/output error was encountered
during expansionpublic static String expand(URL jar, String pathname, String dirname) throws IOException
jar
- URL of the web application archive to be expanded
(must start with "jar:")pathname
- Context path name for web application
IllegalArgumentException
- if this is not a "jar:" URL
IOException
- if an input/output error was encountered
during expansionpublic static boolean copy(File src, File dest)
src
- File object representing the sourcedest
- File object representing the destinationpublic static boolean delete(File dir)
dir
- File object representing the directory to be deletedpublic static boolean deleteDir(File dir)
dir
- File object representing the directory to be deletedprotected static void expand(InputStream input, File docBase, String name) throws IOException
input
- InputStream to be copieddocBase
- Document base directory into which we are expandingname
- Relative pathname of the file to be created
IOException
- if an input/output error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |