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() |
protected abstract Log |
getLog() |
String |
getMimeType() |
String |
getWebappPath() |
WebResourceRoot |
getWebResourceRoot() |
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()
getWebResourceRoot in interface WebResourcepublic final String getWebappPath()
getWebappPath in interface WebResourcepublic final String getLastModifiedHttp()
getLastModifiedHttp in interface WebResourcepublic final String getETag()
WebResourcegetETag in interface WebResourcepublic final void setMimeType(String mimeType)
WebResourcesetMimeType in interface WebResourcemimeType - The mime type that will be associated with the resourcepublic final String getMimeType()
getMimeType 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-2020 Apache Software Foundation. All Rights Reserved.