|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.codehaus.cargo.util.log.LoggedObject
org.codehaus.cargo.container.internal.util.ResourceUtils
public final class ResourceUtils
Utility class that provides a couple of methods for extracting files stored as resource in a JAR.
| Constructor Summary | |
|---|---|
ResourceUtils()
|
|
| Method Summary | |
|---|---|
void |
copyResource(java.lang.String resourceName,
java.io.File destFile)
Copies a container resource from the JAR into the specified file. |
void |
copyResource(java.lang.String resourceName,
java.io.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. |
java.io.File |
getResourceLocation(java.lang.String resourceName)
Search for the given resource and return the directory or archive that contains it. |
| Methods inherited from class org.codehaus.cargo.util.log.LoggedObject |
|---|
getLogger, setLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceUtils()
| Method Detail |
|---|
public void copyResource(java.lang.String resourceName,
java.io.File destFile)
throws java.io.IOException
resourceName - The name of the resourcedestFile - The file to which the contents of the resource should be copied
java.io.IOException - If an I/O error occurs while copying the resource
public void copyResource(java.lang.String resourceName,
java.io.File destFile,
org.apache.tools.ant.types.FilterChain filterChain)
throws java.io.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 copying
java.io.IOException - If an I/O error occurs while copying the resourcepublic java.io.File getResourceLocation(java.lang.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 resource
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||