|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cactus.integration.ant.util.ResourceUtils
Utility class that provides a couple of methods for extracting files stored as resource in a JAR.
Method Summary | |
static void |
copyResource(org.apache.tools.ant.Project theProject,
java.lang.String theResourceName,
java.io.File theDestFile)
Copies a container resource from the JAR into the specified file. |
static void |
copyResource(org.apache.tools.ant.Project theProject,
java.lang.String theResourceName,
java.io.File theDestFile,
org.apache.tools.ant.types.FilterChain theFilterChain)
Copies a container resource from the JAR into the specified file, thereby applying the specified filters. |
static java.io.File |
getResourceLocation(java.lang.String theResourceName)
Search for the given resource and return the directory or archive that contains it. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static void copyResource(org.apache.tools.ant.Project theProject, java.lang.String theResourceName, java.io.File theDestFile) throws java.io.IOException
theProject
- The Ant projecttheResourceName
- The name of the resource, relative to the
org.apache.cactus.integration.ant.container packagetheDestFile
- The file to which the contents of the resource should
be copied
java.io.IOException
- If an I/O error occurs while copying the resourcepublic static void copyResource(org.apache.tools.ant.Project theProject, java.lang.String theResourceName, java.io.File theDestFile, org.apache.tools.ant.types.FilterChain theFilterChain) throws java.io.IOException
theProject
- The Ant projecttheResourceName
- The name of the resource, relative to the
org.apache.cactus.integration.ant.container packagetheDestFile
- The file to which the contents of the resource should
be copiedtheFilterChain
- The ordered list of filter readers that should be
applied while copying
java.io.IOException
- If an I/O error occurs while copying the resourcepublic static java.io.File getResourceLocation(java.lang.String theResourceName)
Doesn't work for archives in JDK 1.1 as the URL returned by getResource doesn't contain the name of the archive.
theResourceName
- The name of the resource
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |