public abstract class AbstractArchiveResource extends AbstractResource
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractArchiveResource.JarInputStreamWrapper
This wrapper assumes that the InputStream was created from a JarFile
obtained from a call to getArchiveResourceSet().openJarFile().
|
sm
Modifier | Constructor and Description |
---|---|
protected |
AbstractArchiveResource(AbstractArchiveResourceSet archiveResourceSet,
java.lang.String webAppPath,
java.lang.String baseUrl,
java.util.jar.JarEntry jarEntry,
java.lang.String codeBaseUrl) |
Modifier and Type | Method and Description |
---|---|
boolean |
canRead()
See
File.canRead() . |
boolean |
delete()
See
File.delete() . |
protected java.io.InputStream |
doGetInputStream() |
boolean |
exists()
See
File.exists() . |
protected AbstractArchiveResourceSet |
getArchiveResourceSet() |
protected java.lang.String |
getBase() |
protected java.lang.String |
getBaseUrl() |
java.lang.String |
getCanonicalPath()
See
File.getCanonicalPath() . |
java.security.cert.Certificate[] |
getCertificates()
Obtain the certificates that were used to sign this resource to verify
it or @null if none.
|
java.net.URL |
getCodeBase()
Get 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.
|
byte[] |
getContent()
Obtain the cached binary content of this resource.
|
long |
getContentLength()
See
File.length() . |
long |
getCreation()
The time the file was created.
|
protected abstract AbstractArchiveResource.JarInputStreamWrapper |
getJarInputStreamWrapper() |
long |
getLastModified()
See
File.lastModified() . |
java.util.jar.Manifest |
getManifest()
Obtain the manifest associated with this resource or @null if none.
|
java.lang.String |
getName()
See
File.getName() . |
protected java.util.jar.JarEntry |
getResource() |
java.net.URL |
getURL()
Obtain a URL to access the resource or
null if no such URL
is available or if the resource does not exist. |
boolean |
isDirectory()
See
File.isDirectory() . |
boolean |
isFile()
See
File.isFile() . |
boolean |
isVirtual()
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
additional
WebResourceSet . |
getETag, getInputStream, getLastModifiedHttp, getLog, getMimeType, getWebappPath, getWebResourceRoot, setMimeType
protected AbstractArchiveResource(AbstractArchiveResourceSet archiveResourceSet, java.lang.String webAppPath, java.lang.String baseUrl, java.util.jar.JarEntry jarEntry, java.lang.String codeBaseUrl)
protected AbstractArchiveResourceSet getArchiveResourceSet()
protected final java.lang.String getBase()
protected final java.lang.String getBaseUrl()
protected final java.util.jar.JarEntry getResource()
public long getLastModified()
WebResource
File.lastModified()
.public boolean exists()
WebResource
File.exists()
.public boolean isVirtual()
WebResource
WebResourceSet
. 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.public boolean isDirectory()
WebResource
File.isDirectory()
.public boolean isFile()
WebResource
File.isFile()
.public boolean delete()
WebResource
File.delete()
.public java.lang.String getName()
WebResource
File.getName()
.public long getContentLength()
WebResource
File.length()
.public java.lang.String getCanonicalPath()
WebResource
File.getCanonicalPath()
.public boolean canRead()
WebResource
File.canRead()
.public long getCreation()
WebResource
WebResource.getLastModified()
will be returned.public java.net.URL getURL()
WebResource
null
if no such URL
is available or if the resource does not exist.public java.net.URL getCodeBase()
WebResource
public final byte[] getContent()
WebResource
public java.security.cert.Certificate[] getCertificates()
WebResource
JarEntry.getCertificates()
public java.util.jar.Manifest getManifest()
WebResource
JarFile.getManifest()
protected final java.io.InputStream doGetInputStream()
doGetInputStream
in class AbstractResource
protected abstract AbstractArchiveResource.JarInputStreamWrapper getJarInputStreamWrapper()
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.