public interface WebResource
File
.Modifier and Type | Method and Description |
---|---|
boolean |
canRead() |
boolean |
delete() |
boolean |
exists() |
java.lang.String |
getCanonicalPath() |
java.security.cert.Certificate[] |
getCertificates() |
java.net.URL |
getCodeBase() |
byte[] |
getContent() |
long |
getContentLength() |
long |
getCreation() |
java.lang.String |
getETag()
Return the strong ETag if available (currently not supported) else return
the weak ETag calculated from the content length and last modified.
|
java.io.InputStream |
getInputStream()
Obtain an InputStream based on the contents of this resource.
|
long |
getLastModified() |
java.lang.String |
getLastModifiedHttp() |
java.util.jar.Manifest |
getManifest() |
java.lang.String |
getMimeType() |
java.lang.String |
getName() |
java.net.URL |
getURL() |
java.lang.String |
getWebappPath() |
WebResourceRoot |
getWebResourceRoot() |
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 . |
void |
setMimeType(java.lang.String mimeType)
Set the MIME type for this Resource.
|
long getLastModified()
File.lastModified()
.java.lang.String getLastModifiedHttp()
boolean exists()
File.exists()
.boolean isVirtual()
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 resourceboolean isDirectory()
File.isDirectory()
.boolean isFile()
File.isFile()
.boolean delete()
File.delete()
.java.lang.String getName()
File.getName()
.long getContentLength()
File.length()
.java.lang.String getCanonicalPath()
File.getCanonicalPath()
.boolean canRead()
File.canRead()
.java.lang.String getWebappPath()
java.lang.String getETag()
void setMimeType(java.lang.String mimeType)
mimeType
- The mime type that will be associated with the resourcejava.lang.String getMimeType()
java.io.InputStream getInputStream()
null
if the resource does not exist or does not
represent a filebyte[] getContent()
long getCreation()
getLastModified()
will be returned.java.net.URL getURL()
null
if no such URL
is available or if the resource does not exist.java.net.URL getCodeBase()
WebResourceRoot getWebResourceRoot()
java.security.cert.Certificate[] getCertificates()
JarEntry.getCertificates()
java.util.jar.Manifest getManifest()
JarFile.getManifest()
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.