Package org.apache.catalina.webresources
Class AbstractArchiveResource
- java.lang.Object
- 
- org.apache.catalina.webresources.AbstractResource
- 
- org.apache.catalina.webresources.AbstractArchiveResource
 
 
- 
- All Implemented Interfaces:
- WebResource
 - Direct Known Subclasses:
- AbstractSingleArchiveResource,- JarWarResource
 
 public abstract class AbstractArchiveResource extends AbstractResource 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected classAbstractArchiveResource.JarInputStreamWrapperThis wrapper assumes that the InputStream was created from a JarFile obtained from a call to getArchiveResourceSet().openJarFile().
 - 
Field Summary- 
Fields inherited from class org.apache.catalina.webresources.AbstractResourcesm
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedAbstractArchiveResource(AbstractArchiveResourceSet archiveResourceSet, java.lang.String webAppPath, java.lang.String baseUrl, java.util.jar.JarEntry jarEntry, java.lang.String codeBaseUrl)
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleancanRead()booleandelete()protected java.io.InputStreamdoGetInputStream()booleanexists()protected AbstractArchiveResourceSetgetArchiveResourceSet()protected java.lang.StringgetBase()protected java.lang.StringgetBaseUrl()java.lang.StringgetCanonicalPath()java.security.cert.Certificate[]getCertificates()java.net.URLgetCodeBase()byte[]getContent()longgetContentLength()longgetCreation()protected abstract AbstractArchiveResource.JarInputStreamWrappergetJarInputStreamWrapper()longgetLastModified()java.util.jar.ManifestgetManifest()java.lang.StringgetName()protected java.util.jar.JarEntrygetResource()java.net.URLgetURL()booleanisDirectory()booleanisFile()booleanisVirtual()Indicates if this resource is required for applications to correctly scan the file structure but that does not exist in either the main or any additionalWebResourceSet.- 
Methods inherited from class org.apache.catalina.webresources.AbstractResourcegetETag, getInputStream, getLastModifiedHttp, getLog, getMimeType, getWebappPath, getWebResourceRoot, setMimeType
 
- 
 
- 
- 
- 
Constructor Detail- 
AbstractArchiveResourceprotected AbstractArchiveResource(AbstractArchiveResourceSet archiveResourceSet, java.lang.String webAppPath, java.lang.String baseUrl, java.util.jar.JarEntry jarEntry, java.lang.String codeBaseUrl) 
 
- 
 - 
Method Detail- 
getArchiveResourceSetprotected AbstractArchiveResourceSet getArchiveResourceSet() 
 - 
getBaseprotected final java.lang.String getBase() 
 - 
getBaseUrlprotected final java.lang.String getBaseUrl() 
 - 
getResourceprotected final java.util.jar.JarEntry getResource() 
 - 
getLastModifiedpublic long getLastModified() - Returns:
- File.lastModified().
 
 - 
existspublic boolean exists() - Returns:
- File.exists().
 
 - 
isVirtualpublic boolean isVirtual() Description copied from interface:WebResourceIndicates if this resource is required for applications to correctly scan the file structure but that does not exist in either the main or any additionalWebResourceSet. For example, if an external directory is mapped to /WEB-INF/lib in an otherwise empty web application, /WEB-INF will be represented as a virtual resource.- Returns:
- truefor a virtual resource
 
 - 
isDirectorypublic boolean isDirectory() - Returns:
- File.isDirectory().
 
 - 
isFilepublic boolean isFile() - Returns:
- File.isFile().
 
 - 
deletepublic boolean delete() - Returns:
- File.delete().
 
 - 
getNamepublic java.lang.String getName() - Returns:
- File.getName().
 
 - 
getContentLengthpublic long getContentLength() - Returns:
- File.length().
 
 - 
getCanonicalPathpublic java.lang.String getCanonicalPath() - Returns:
- File.getCanonicalPath().
 
 - 
canReadpublic boolean canRead() - Returns:
- File.canRead().
 
 - 
getCreationpublic long getCreation() - Returns:
- The time the file was created. If not available, the result of
 WebResource.getLastModified()will be returned.
 
 - 
getURLpublic java.net.URL getURL() - Returns:
- a URL to access the resource or nullif no such URL is available or if the resource does not exist.
 
 - 
getCodeBasepublic java.net.URL getCodeBase() - Returns:
- the code base for this resource that will be used when looking up the assigned permissions for the code base in the security policy file when running under a security manager.
 
 - 
getContentpublic final byte[] getContent() - Returns:
- the binary content of this resource or nullif it is not available in a byte[] because, for example, it is too big.
 
 - 
getCertificatespublic java.security.cert.Certificate[] getCertificates() - Returns:
- the certificates that were used to sign this resource to verify it or @null if none.
- See Also:
- JarEntry.getCertificates()
 
 - 
getManifestpublic java.util.jar.Manifest getManifest() - Returns:
- the manifest associated with this resource or @null if none.
- See Also:
- JarFile.getManifest()
 
 - 
doGetInputStreamprotected final java.io.InputStream doGetInputStream() - Specified by:
- doGetInputStreamin class- AbstractResource
 
 - 
getJarInputStreamWrapperprotected abstract AbstractArchiveResource.JarInputStreamWrapper getJarInputStreamWrapper() 
 
- 
 
-