| java.lang.Object com.opensymphony.oscache.web.filter.ResponseContent
ResponseContent | public class ResponseContent implements Serializable(Code) | | Holds the servlet response in a byte array so that it can be held
in the cache (and, since this class is serializable, optionally
persisted to disk).
version: $Revision: 362 $ author: Serge Knystautas |
commit | public void commit()(Code) | | Called once the response has been written in its entirety. This
method commits the response output stream by converting the output
stream into a byte array.
|
getExpires | public long getExpires()(Code) | | the expires date and time in miliseconds when the content will be stale |
getLastModified | public long getLastModified()(Code) | | |
getMaxAge | public long getMaxAge()(Code) | | Returns the max age of the content in miliseconds. If expires header and cache control are
enabled both, both will be equal.
the max age of the content in miliseconds, if -1 max-age is disabled |
getOutputStream | public OutputStream getOutputStream()(Code) | | Get an output stream. This is used by the
SplitServletOutputStream to capture the original (uncached) response into a byte array.
the original (uncached) response, returns null if response is already committed. |
getSize | public int getSize()(Code) | | Gets the size of this cached content.
The size of the content, in bytes. If no contentexists, this method returns -1 . |
isContentGZiped | public boolean isContentGZiped()(Code) | | true if the content is GZIP compressed |
setContentEncoding | public void setContentEncoding(String contentEncoding)(Code) | | |
setContentType | public void setContentType(String value)(Code) | | Set the content type. We capture this so that when we serve this
data from cache, we can set the correct content type on the response.
|
setExpires | public void setExpires(long value)(Code) | | Sets the expires date and time in miliseconds.
Parameters: value - time in miliseconds when the content will expire |
setLastModified | public void setLastModified(long value)(Code) | | |
setLocale | public void setLocale(Locale value)(Code) | | Set the Locale. We capture this so that when we serve this data from
cache, we can set the correct locale on the response.
|
setMaxAge | public void setMaxAge(long value)(Code) | | Sets the max age date and time in miliseconds. If the parameter is -1, the max-age parameter
won't be set by default in the Cache-Control header.
Parameters: value - sets the intial |
writeTo | public void writeTo(ServletResponse response) throws IOException(Code) | | Writes this cached data out to the supplied ServletResponse .
Parameters: response - The servlet response to output the cached content to. throws: IOException - |
writeTo | public void writeTo(ServletResponse response, boolean fragment, boolean acceptsGZip) throws IOException(Code) | | Writes this cached data out to the supplied ServletResponse .
Parameters: response - The servlet response to output the cached content to. Parameters: fragment - is true if this content a fragment or part of a page Parameters: acceptsGZip - is true if client browser supports gzip compression throws: IOException - |
|
|