| java.lang.Object org.apache.openejb.util.JarExtractor
JarExtractor | public class JarExtractor (Code) | | version: $Rev: 637617 $ $Date: 2008-03-16 10:42:30 -0700 $ |
Method Summary | |
public static boolean | copy(File src, File dest) Copy the specified file or directory to the destination. | public static boolean | delete(File dir) Delete the specified directory, including all of its contents and
subdirectories recursively. | public static boolean | deleteDir(File dir) Delete the specified directory, including all of its contents and
subdirectories recursively. | public static File | extract(File file, String pathname) Extract the Jar file into an unpacked directory structure, and
return the absolute pathname to the extracted directory. | public static void | extract(File file, File destinationDir) Extract the jar file into the specifiec destination directory. | protected static File | extract(InputStream input, File docBase, String name) Extract the specified input stream into the specified directory, creating
a file named from the specified relative path. |
copy | public static boolean copy(File src, File dest)(Code) | | Copy the specified file or directory to the destination.
Parameters: src - File object representing the source Parameters: dest - File object representing the destination |
delete | public static boolean delete(File dir)(Code) | | Delete the specified directory, including all of its contents and
subdirectories recursively.
Parameters: dir - File object representing the directory to be deleted |
deleteDir | public static boolean deleteDir(File dir)(Code) | | Delete the specified directory, including all of its contents and
subdirectories recursively.
Parameters: dir - File object representing the directory to be deleted |
extract | public static File extract(File file, String pathname) throws IOException(Code) | | Extract the Jar file into an unpacked directory structure, and
return the absolute pathname to the extracted directory.
Parameters: file - Jar file to unpack Parameters: pathname - Context path name for web application throws: IllegalArgumentException - if this is not a "jar:" URL throws: java.io.IOException - if an input/output error was encounteredduring expansion |
extract | public static void extract(File file, File destinationDir) throws IOException(Code) | | Extract the jar file into the specifiec destination directory. If the destination directory
already exists, the jar will not be unpacked.
Parameters: file - jar file to unpack Parameters: destinationDir - the directory in which the jar will be unpacked; must not exist throws: java.io.IOException - if an input/output error was encountered during expansion |
extract | protected static File extract(InputStream input, File docBase, String name) throws IOException(Code) | | Extract the specified input stream into the specified directory, creating
a file named from the specified relative path.
Parameters: input - InputStream to be copied Parameters: docBase - Document base directory into which we are extracting Parameters: name - Relative pathname of the file to be created A handle to the extracted File throws: java.io.IOException - if an input/output error occurs |
|
|