|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cactus.integration.ant.deployment.DefaultJarArchive
Provide convenient methods to read information from a Jar archive.
Constructor Summary | |
DefaultJarArchive(java.io.File theFile)
Constructor. |
|
DefaultJarArchive(java.io.InputStream theInputStream)
Constructor. |
Method Summary | |
boolean |
containsClass(java.lang.String theClassName)
Returns whether a class of the specified name is contained in the archive. |
java.lang.String |
findResource(java.lang.String theName)
Returns the full path of a named resource in the archive. |
java.io.InputStream |
getResource(java.lang.String thePath)
Returns a resource from the archive as input stream. |
java.util.List |
getResources(java.lang.String thePath)
Returns the list of resources in the specified directory. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultJarArchive(java.io.File theFile) throws java.io.IOException
theFile
- The archive file
java.io.IOException
- If there was a problem reading the WARpublic DefaultJarArchive(java.io.InputStream theInputStream) throws java.io.IOException
theInputStream
- The input stream for the archive (it will be closed
after the constructor returns)
java.io.IOException
- If there was a problem reading the WARMethod Detail |
public boolean containsClass(java.lang.String theClassName) throws java.io.IOException
JarArchive
containsClass
in interface JarArchive
theClassName
- The name of the class to search for
java.io.IOException
- If an I/O error occurred reading the archiveJarArchive.containsClass(String)
public final java.lang.String findResource(java.lang.String theName) throws java.io.IOException
JarArchive
findResource
in interface JarArchive
theName
- The name of the resource
java.io.IOException
- If an I/O error occurred reading the archiveJarArchive.findResource(String)
public final java.io.InputStream getResource(java.lang.String thePath) throws java.io.IOException
JarArchive
getResource
in interface JarArchive
thePath
- The path to the resource in the archive
null
if the resource was not found in the JAR
java.io.IOException
- If an I/O error occursJarArchive.getResource(String)
public final java.util.List getResources(java.lang.String thePath) throws java.io.IOException
JarArchive
getResources
in interface JarArchive
thePath
- The directory
java.io.IOException
- If an I/O error occursJarArchive.getResources(String)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |