public abstract class AbstractArchiveResource extends AbstractResource
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractArchiveResource.JarInputStreamWrapper |
sm
Modifier | Constructor and Description |
---|---|
protected |
AbstractArchiveResource(WebResourceRoot root,
String webAppPath,
String base,
String baseUrl,
JarEntry jarEntry,
String internalPath,
Manifest manifest,
String codeBaseUrl) |
Modifier and Type | Method and Description |
---|---|
boolean |
canRead()
See
File.canRead() . |
boolean |
delete()
See
File.delete() . |
protected InputStream |
doGetInputStream() |
boolean |
exists()
See
File.exists() . |
protected String |
getBase() |
protected String |
getBaseUrl() |
String |
getCanonicalPath()
|
Certificate[] |
getCertificates()
Obtain the certificates that were used to sign this resource to verify
it or @null if none.
|
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() . |
Manifest |
getManifest()
Obtain the manifest associated with this resource or @null if none.
|
String |
getName()
See
File.getName() . |
protected JarEntry |
getResource() |
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 final String getBase()
protected final String getBaseUrl()
protected final 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 String getName()
WebResource
File.getName()
.public long getContentLength()
WebResource
File.length()
.public String getCanonicalPath()
WebResource
public boolean canRead()
WebResource
File.canRead()
.public long getCreation()
WebResource
WebResource.getLastModified()
will be returned.public URL getURL()
WebResource
null
if no such URL
is available or if the resource does not exist.public URL getCodeBase()
WebResource
public final byte[] getContent()
WebResource
public Certificate[] getCertificates()
WebResource
JarEntry.getCertificates()
public Manifest getManifest()
WebResource
JarFile.getManifest()
protected final InputStream doGetInputStream()
doGetInputStream
in class AbstractResource
protected abstract AbstractArchiveResource.JarInputStreamWrapper getJarInputStreamWrapper()
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.