public abstract class AbstractResource extends java.lang.Object implements WebResource
| Modifier and Type | Field and Description |
|---|---|
protected static StringManager |
sm |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractResource(WebResourceRoot root,
java.lang.String webAppPath) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract java.io.InputStream |
doGetInputStream() |
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.
|
java.lang.String |
getLastModifiedHttp() |
protected abstract Log |
getLog() |
java.lang.String |
getMimeType() |
java.lang.String |
getWebappPath() |
WebResourceRoot |
getWebResourceRoot() |
void |
setMimeType(java.lang.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, java.lang.String webAppPath)
public final WebResourceRoot getWebResourceRoot()
getWebResourceRoot in interface WebResourcepublic final java.lang.String getWebappPath()
getWebappPath in interface WebResourcepublic final java.lang.String getLastModifiedHttp()
getLastModifiedHttp in interface WebResourcepublic final java.lang.String getETag()
WebResourcegetETag in interface WebResourcepublic final void setMimeType(java.lang.String mimeType)
WebResourcesetMimeType in interface WebResourcemimeType - The mime type that will be associated with the resourcepublic final java.lang.String getMimeType()
getMimeType in interface WebResourcepublic final java.io.InputStream getInputStream()
WebResourcegetInputStream in interface WebResourcenull if the resource does not exist or does not
represent a fileprotected abstract java.io.InputStream doGetInputStream()
protected abstract Log getLog()
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.