Save This Page
Home » cactus-1.8.0-src » org.apache.cactus.integration.ant.util » [javadoc | source]
org.apache.cactus.integration.ant.util
public final class: ResourceUtils [javadoc | source]
java.lang.Object
   org.apache.cactus.integration.ant.util.ResourceUtils
Utility class that provides a couple of methods for extracting files stored as resource in a JAR.
Method from org.apache.cactus.integration.ant.util.ResourceUtils Summary:
copyResource,   copyResource,   getResourceLocation
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.cactus.integration.ant.util.ResourceUtils Detail:
 public static  void copyResource(Project theProject,
    String theResourceName,
    File theDestFile) throws IOException 
    Copies a container resource from the JAR into the specified file.
 public static  void copyResource(Project theProject,
    String theResourceName,
    File theDestFile,
    FilterChain theFilterChain) throws IOException 
    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.

    Doesn't work for archives in JDK 1.1 as the URL returned by getResource doesn't contain the name of the archive.