| java.lang.Object org.apache.cactus.integration.ant.util.ResourceUtils
ResourceUtils | final public class ResourceUtils (Code) | | Utility class that provides a couple of methods for extracting files stored
as resource in a JAR.
version: $Id: ResourceUtils.java 238812 2004-02-29 10:21:34Z vmassol $ |
Method Summary | |
public static void | copyResource(Project theProject, String theResourceName, File theDestFile) Copies a container resource from the JAR into the specified file. | public static void | copyResource(Project theProject, String theResourceName, File theDestFile, FilterChain theFilterChain) Copies a container resource from the JAR into the specified file, thereby
applying the specified filters. | public static File | getResourceLocation(String theResourceName) Search for the given resource and return the directory or archive
that contains it. |
copyResource | public static void copyResource(Project theProject, String theResourceName, File theDestFile) throws IOException(Code) | | Copies a container resource from the JAR into the specified file.
Parameters: theProject - The Ant project Parameters: theResourceName - The name of the resource, relative to theorg.apache.cactus.integration.ant.container package Parameters: theDestFile - The file to which the contents of the resource shouldbe copied throws: IOException - If an I/O error occurs while copying the resource |
copyResource | public static void copyResource(Project theProject, String theResourceName, File theDestFile, FilterChain theFilterChain) throws IOException(Code) | | Copies a container resource from the JAR into the specified file, thereby
applying the specified filters.
Parameters: theProject - The Ant project Parameters: theResourceName - The name of the resource, relative to theorg.apache.cactus.integration.ant.container package Parameters: theDestFile - The file to which the contents of the resource shouldbe copied Parameters: theFilterChain - The ordered list of filter readers that should beapplied while copying throws: IOException - If an I/O error occurs while copying the resource |
getResourceLocation | public static File getResourceLocation(String theResourceName)(Code) | | Search for the given resource and return the directory or archive
that contains it.
Doesn't work for archives in JDK 1.1 as the URL returned by
getResource doesn't contain the name of the archive.
Parameters: theResourceName - The name of the resource The directory or archive containing the specified resource |
|
|