Package org.apache.catalina.webresources
Class AbstractResource
java.lang.Object
org.apache.catalina.webresources.AbstractResource
- All Implemented Interfaces:
- WebResource
- Direct Known Subclasses:
- AbstractArchiveResource,- FileResource,- JarResourceRoot
- 
Field SummaryFields
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedAbstractResource(WebResourceRoot root, String webAppPath) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected abstract InputStreamfinal StringgetETag()Return the strong ETag if available (currently not supported) else return the weak ETag calculated from the content length and last modified.final InputStreamObtain an InputStream based on the contents of this resource.final Stringprotected abstract LoggetLog()final Stringfinal Stringfinal WebResourceRootfinal voidsetMimeType(String mimeType) Set the MIME type for this Resource.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.catalina.WebResourcecanRead, delete, exists, getCanonicalPath, getCertificates, getCodeBase, getContent, getContentLength, getCreation, getLastModified, getManifest, getName, getURL, isDirectory, isFile, isVirtual
- 
Field Details- 
sm
 
- 
- 
Constructor Details- 
AbstractResource
 
- 
- 
Method Details- 
getWebResourceRoot- Specified by:
- getWebResourceRootin interface- WebResource
- Returns:
- a reference to the WebResourceRoot of which this WebResource is a part.
 
- 
getWebappPath- Specified by:
- getWebappPathin interface- WebResource
- Returns:
- The path of this resource relative to the web application root. If the resource is a directory, the return value will end in '/'.
 
- 
getLastModifiedHttp- Specified by:
- getLastModifiedHttpin interface- WebResource
- Returns:
- the last modified time of this resource in the correct format for the HTTP Last-Modified header as specified by RFC 2616.
 
- 
getETagDescription copied from interface:WebResourceReturn the strong ETag if available (currently not supported) else return the weak ETag calculated from the content length and last modified.- Specified by:
- getETagin interface- WebResource
- Returns:
- The ETag for this resource
 
- 
setMimeTypeDescription copied from interface:WebResourceSet the MIME type for this Resource.- Specified by:
- setMimeTypein interface- WebResource
- Parameters:
- mimeType- The mime type that will be associated with the resource
 
- 
getMimeType- Specified by:
- getMimeTypein interface- WebResource
- Returns:
- the MIME type for this Resource.
 
- 
getInputStreamDescription copied from interface:WebResourceObtain an InputStream based on the contents of this resource.- Specified by:
- getInputStreamin interface- WebResource
- Returns:
- An InputStream based on the contents of this resource or
          nullif the resource does not exist or does not represent a file
 
- 
doGetInputStream
- 
getLog
 
-