Top Fields Constructors Methods
org.apache.catalina.webresources

public abstract Class AbstractResource

extends Object
implements WebResource
Class Inheritance
All Implemented Interfaces
org.apache.catalina.WebResource
Known Direct Subclasses
org.apache.catalina.webresources.FileResource, org.apache.catalina.webresources.JarResourceRoot, org.apache.catalina.webresources.AbstractArchiveResource
Imports
java.io.InputStream, org.apache.catalina.WebResource, .WebResourceRoot, org.apache.juli.logging.Log, org.apache.tomcat.util.http.FastHttpDateFormat, org.apache.tomcat.util.res.StringManager

Field Summary

Modifier and TypeField and Description
private String
private final WebResourceRoot
protected static final StringManager
private volatile String
private final String

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
protected abstract InputStream
public final String
getETag()

Implements org.apache.catalina.WebResource.getETag.

Return the strong ETag if available (currently not supported) else return the weak ETag calculated from the content length and last modified.

public final InputStream
getInputStream()

Implements org.apache.catalina.WebResource.getInputStream.

Obtain an InputStream based on the contents of this resource.

public final String
protected abstract Log
public final String
public final String
public final WebResourceRoot
public final void
setMimeType(String
The mime type that will be associated with the resource
mimeType
)

Implements org.apache.catalina.WebResource.setMimeType.

Set the MIME type for this Resource.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

mimeTypeback to summary
private String mimeType
rootback to summary
private final WebResourceRoot root
smback to summary
protected static final StringManager sm
weakETagback to summary
private volatile String weakETag
webAppPathback to summary
private final String webAppPath

Constructor Detail

AbstractResourceback to summary
protected AbstractResource(WebResourceRoot root, String webAppPath)

Method Detail

doGetInputStreamback to summary
protected abstract InputStream doGetInputStream()
getETagback to summary
public final String getETag()

Implements org.apache.catalina.WebResource.getETag.

Doc from org.apache.catalina.WebResource.getETag.

Return the strong ETag if available (currently not supported) else return the weak ETag calculated from the content length and last modified.

Returns:String

The ETag for this resource

Annotations
@Override
getInputStreamback to summary
public final InputStream getInputStream()

Implements org.apache.catalina.WebResource.getInputStream.

Doc from org.apache.catalina.WebResource.getInputStream.

Obtain an InputStream based on the contents of this resource.

Returns:InputStream

An InputStream based on the contents of this resource or null if the resource does not exist or does not represent a file

Annotations
@Override
getLastModifiedHttpback to summary
public final String getLastModifiedHttp()

Implements org.apache.catalina.WebResource.getLastModifiedHttp.

Returns:String

Doc from org.apache.catalina.WebResource.getLastModifiedHttp.

the last modified time of this resource in the correct format for the HTTP Last-Modified header as specified by RFC 2616.

Annotations
@Override
getLogback to summary
protected abstract Log getLog()
getMimeTypeback to summary
public final String getMimeType()

Implements org.apache.catalina.WebResource.getMimeType.

Returns:String

Doc from org.apache.catalina.WebResource.getMimeType.

the MIME type for this Resource.

Annotations
@Override
getWebappPathback to summary
public final String getWebappPath()

Implements org.apache.catalina.WebResource.getWebappPath.

Returns:String

Doc from org.apache.catalina.WebResource.getWebappPath.

The path of this resource relative to the web application root. If the resource is a directory, the return value will end in '/'.

Annotations
@Override
getWebResourceRootback to summary
public final WebResourceRoot getWebResourceRoot()

Implements org.apache.catalina.WebResource.getWebResourceRoot.

Returns:WebResourceRoot

Doc from org.apache.catalina.WebResource.getWebResourceRoot.

a reference to the WebResourceRoot of which this WebResource is a part.

Annotations
@Override
setMimeTypeback to summary
public final void setMimeType(String mimeType)

Implements org.apache.catalina.WebResource.setMimeType.

Doc from org.apache.catalina.WebResource.setMimeType.

Set the MIME type for this Resource.

Parameters
mimeType:String

The mime type that will be associated with the resource

Annotations
@Override