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()
See
File.canRead() . |
boolean |
delete()
See
File.delete() . |
protected java.io.InputStream |
doGetInputStream() |
boolean |
exists()
See
File.exists() . |
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.
|
long |
getLastModified()
See
File.lastModified() . |
protected Log |
getLog() |
java.util.jar.Manifest |
getManifest()
Obtain the manifest associated with this resource or @null if none.
|
java.lang.String |
getName()
See
File.getName() . |
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, getMimeType, getWebappPath, getWebResourceRoot, setMimeType
public JarResourceRoot(WebResourceRoot root, java.io.File base, java.lang.String baseUrl, java.lang.String webAppPath)
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()
.protected java.io.InputStream doGetInputStream()
doGetInputStream
in class AbstractResource
public byte[] getContent()
WebResource
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
protected Log getLog()
getLog
in class AbstractResource
public java.security.cert.Certificate[] getCertificates()
WebResource
JarEntry.getCertificates()
public java.util.jar.Manifest getManifest()
WebResource
JarFile.getManifest()
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.