public final class ResourceUtils
extends org.codehaus.cargo.util.log.LoggedObject
Constructor and Description |
---|
ResourceUtils() |
Modifier and Type | Method and Description |
---|---|
void |
copyResource(String resourceName,
File destFile)
Copies a container resource from the JAR into the specified file.
|
void |
copyResource(String resourceName,
File destFile,
org.apache.tools.ant.types.FilterChain filterChain)
Copies a container resource from the JAR into the specified file, thereby applying the
specified filters.
|
void |
copyResource(String resourceName,
String destFile,
org.codehaus.cargo.util.FileHandler handler)
Copies a container resource from the JAR into the specified file using the specified
file handler.
|
void |
copyResource(String resourceName,
String destFile,
org.codehaus.cargo.util.FileHandler handler,
org.apache.tools.ant.types.FilterChain filterChain)
Copies a container resource from the JAR into the specified file, using the specified
file handler thereby applying the specified filters.
|
File |
getResourceLocation(String resourceName)
Search for the given resource and return the directory or archive that contains it.
|
public void copyResource(String resourceName, File destFile) throws IOException
resourceName
- The name of the resourcedestFile
- The file to which the contents of the resource should be copiedIOException
- If an I/O error occurs while copying the resourcepublic void copyResource(String resourceName, String destFile, org.codehaus.cargo.util.FileHandler handler) throws IOException
resourceName
- The name of the resourcedestFile
- The file to which the contents of the resource should be copiedhandler
- The file handler to useIOException
- If an I/O error occurs while copying the resourcepublic void copyResource(String resourceName, File destFile, org.apache.tools.ant.types.FilterChain filterChain) throws IOException
resourceName
- The name of the resource, relative to the
org.apache.cactus.integration.ant.container packagedestFile
- The file to which the contents of the resource should be copiedfilterChain
- The ordered list of filter readers that should be applied while copyingIOException
- If an I/O error occurs while copying the resourcepublic void copyResource(String resourceName, String destFile, org.codehaus.cargo.util.FileHandler handler, org.apache.tools.ant.types.FilterChain filterChain) throws IOException
resourceName
- The name of the resource, relative to the
org.apache.cactus.integration.ant.container packagedestFile
- The file to which the contents of the resource should be copiedhandler
- The file handler to be used for file copyfilterChain
- The ordered list of filter readers that should be applied while copyingIOException
- If an I/O error occurs while copying the resourcepublic File getResourceLocation(String resourceName)
Doesn't work for archives in JDK 1.1 as the URL returned by getResource doesn't contain the name of the archive.
resourceName
- The name of the resourceCopyright © 2004-2013 Codehaus. All Rights Reserved.