Class AbstractResource
java.lang.Object
org.apache.catalina.webresources.AbstractResource
- All Implemented Interfaces:
WebResource
- Direct Known Subclasses:
AbstractArchiveResource, FileResource, JarResourceRoot
Abstract
WebResource implementation that provides common functionality for all web resource implementations.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringManagerThe string manager for this class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractResource(WebResourceRoot root, String webAppPath) Constructs a new AbstractResource. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract InputStreamReturns the input stream for this resource.final StringgetETag()Gets the weak ETag for this resource.final InputStreamGets the input stream for this resource.final StringGets the last modified date as an HTTP date string.protected abstract LoggetLog()Gets the logger for this resource.final StringGets the MIME type for this resource.final StringGets the strong ETag for this resource.final StringGets the web app path.final WebResourceRootGets the web resource root.final voidsetMimeType(String mimeType) Sets the MIME type for this resource.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface WebResource
canRead, delete, exists, getCanonicalPath, getCertificates, getCodeBase, getContent, getContentLength, getCreation, getLastModified, getManifest, getName, getURL, isDirectory, isFile, isVirtual
-
Field Details
-
sm
The string manager for this class.
-
-
Constructor Details
-
AbstractResource
Constructs a new AbstractResource.- Parameters:
root- The rootwebAppPath- The web app path
-
-
Method Details
-
getWebResourceRoot
Gets the web resource root.- Specified by:
getWebResourceRootin interfaceWebResource- Returns:
- The web resource root
-
getWebappPath
Gets the web app path.- Specified by:
getWebappPathin interfaceWebResource- Returns:
- The web app path
-
getLastModifiedHttp
Gets the last modified date as an HTTP date string.- Specified by:
getLastModifiedHttpin interfaceWebResource- Returns:
- The last modified date as an HTTP date string
-
getETag
Gets the weak ETag for this resource.- Specified by:
getETagin interfaceWebResource- Returns:
- The weak ETag
-
getStrongETag
Gets the strong ETag for this resource.- Specified by:
getStrongETagin interfaceWebResource- Returns:
- The strong ETag
-
setMimeType
Sets the MIME type for this resource.- Specified by:
setMimeTypein interfaceWebResource- Parameters:
mimeType- The MIME type
-
getMimeType
Gets the MIME type for this resource.- Specified by:
getMimeTypein interfaceWebResource- Returns:
- The MIME type
-
getInputStream
Gets the input stream for this resource.- Specified by:
getInputStreamin interfaceWebResource- Returns:
- the input stream for this resource
-
doGetInputStream
Returns the input stream for this resource.- Returns:
- the input stream for this resource
-
getLog
-