public abstract class AbstractResource extends Object implements WebResource
| Modifier and Type | Field and Description |
|---|---|
protected static StringManager |
sm |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractResource(WebResourceRoot root,
String webAppPath) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract InputStream |
doGetInputStream() |
String |
getETag()
Return the strong ETag if available (currently not supported) else return
the weak ETag calculated from the content length and last modified.
|
InputStream |
getInputStream()
Obtain an InputStream based on the contents of this resource.
|
String |
getLastModifiedHttp()
Return the last modified time of this resource in the correct format for
the HTTP Last-Modified header as specified by RFC 2616.
|
protected abstract Log |
getLog() |
String |
getMimeType()
Get the MIME type for this Resource.
|
String |
getWebappPath()
The path of this resource relative to the web application root.
|
WebResourceRoot |
getWebResourceRoot()
Obtain a reference to the WebResourceRoot of which this WebResource is a
part.
|
void |
setMimeType(String mimeType)
Set the MIME type for this Resource.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanRead, delete, exists, getCanonicalPath, getCertificates, getCodeBase, getContent, getContentLength, getCreation, getLastModified, getManifest, getName, getURL, isDirectory, isFile, isVirtualprotected static final StringManager sm
protected AbstractResource(WebResourceRoot root, String webAppPath)
public final WebResourceRoot getWebResourceRoot()
WebResourcegetWebResourceRoot in interface WebResourcepublic final String getWebappPath()
WebResourcegetWebappPath in interface WebResourcepublic final String getLastModifiedHttp()
WebResourcegetLastModifiedHttp in interface WebResourcepublic final String getETag()
WebResourcegetETag in interface WebResourcepublic final void setMimeType(String mimeType)
WebResourcesetMimeType in interface WebResourcepublic final String getMimeType()
WebResourcegetMimeType in interface WebResourcepublic final InputStream getInputStream()
WebResourcegetInputStream in interface WebResourcenull if the resource does not exist or does not
represent a fileprotected abstract InputStream doGetInputStream()
protected abstract Log getLog()
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.