public class JarResourceRoot extends AbstractResource
sm
Constructor and Description |
---|
JarResourceRoot(WebResourceRoot root,
java.io.File base,
java.lang.String baseUrl,
java.lang.String webAppPath) |
Modifier and Type | Method and Description |
---|---|
boolean |
canRead() |
boolean |
delete() |
protected java.io.InputStream |
doGetInputStream() |
boolean |
exists() |
java.lang.String |
getCanonicalPath() |
java.security.cert.Certificate[] |
getCertificates() |
java.net.URL |
getCodeBase() |
byte[] |
getContent() |
long |
getContentLength() |
long |
getCreation() |
long |
getLastModified() |
protected Log |
getLog() |
java.util.jar.Manifest |
getManifest() |
java.lang.String |
getName() |
java.net.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, getMimeType, getWebappPath, getWebResourceRoot, setMimeType
public JarResourceRoot(WebResourceRoot root, java.io.File base, java.lang.String baseUrl, java.lang.String webAppPath)
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 java.lang.String getName()
File.getName()
.public long getContentLength()
File.length()
.public java.lang.String getCanonicalPath()
File.getCanonicalPath()
.public boolean canRead()
File.canRead()
.protected java.io.InputStream doGetInputStream()
doGetInputStream
in class AbstractResource
public byte[] getContent()
public long getCreation()
WebResource.getLastModified()
will be returned.public java.net.URL getURL()
null
if no such URL
is available or if the resource does not exist.public java.net.URL getCodeBase()
protected Log getLog()
getLog
in class AbstractResource
public java.security.cert.Certificate[] getCertificates()
JarEntry.getCertificates()
public java.util.jar.Manifest getManifest()
JarFile.getManifest()
Copyright © 2000-2022 Apache Software Foundation. All Rights Reserved.