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().getJarFile().
|
sm
Modifier | Constructor and Description |
---|---|
protected |
AbstractArchiveResource(AbstractArchiveResourceSet archiveResourceSet,
String webAppPath,
String baseUrl,
JarEntry jarEntry,
String codeBaseUrl) |
Modifier and Type | Method and Description |
---|---|
boolean |
canRead() |
boolean |
delete() |
protected InputStream |
doGetInputStream() |
boolean |
exists() |
protected AbstractArchiveResourceSet |
getArchiveResourceSet() |
protected String |
getBase() |
protected String |
getBaseUrl() |
String |
getCanonicalPath() |
Certificate[] |
getCertificates() |
URL |
getCodeBase() |
byte[] |
getContent() |
long |
getContentLength() |
long |
getCreation() |
protected abstract AbstractArchiveResource.JarInputStreamWrapper |
getJarInputStreamWrapper() |
long |
getLastModified() |
Manifest |
getManifest() |
String |
getName() |
protected JarEntry |
getResource() |
URL |
getURL() |
boolean |
isDirectory() |
boolean |
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, String webAppPath, String baseUrl, JarEntry jarEntry, String codeBaseUrl)
protected AbstractArchiveResourceSet getArchiveResourceSet()
protected final String getBase()
protected final String getBaseUrl()
protected final JarEntry getResource()
public long getLastModified()
File.lastModified()
.public boolean exists()
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.true
for a virtual resourcepublic boolean isDirectory()
File.isDirectory()
.public boolean isFile()
File.isFile()
.public boolean delete()
File.delete()
.public String getName()
File.getName()
.public long getContentLength()
File.length()
.public String getCanonicalPath()
File.getCanonicalPath()
.public boolean canRead()
File.canRead()
.public long getCreation()
WebResource.getLastModified()
will be returned.public URL getURL()
null
if no such URL
is available or if the resource does not exist.public URL getCodeBase()
public final byte[] getContent()
public Certificate[] getCertificates()
JarEntry.getCertificates()
public Manifest getManifest()
JarFile.getManifest()
protected final InputStream doGetInputStream()
doGetInputStream
in class AbstractResource
protected abstract AbstractArchiveResource.JarInputStreamWrapper getJarInputStreamWrapper()
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.