Save This Page
Home » oscache-2.4.1-full » com.opensymphony.oscache » web » filter » [javadoc | source]
com.opensymphony.oscache.web.filter
public class: ResponseContent [javadoc | source]
java.lang.Object
   com.opensymphony.oscache.web.filter.ResponseContent

All Implemented Interfaces:
    Serializable

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).
Method from com.opensymphony.oscache.web.filter.ResponseContent Summary:
commit,   getContentEncoding,   getContentType,   getExpires,   getLastModified,   getMaxAge,   getOutputStream,   getSize,   isContentGZiped,   setContentEncoding,   setContentType,   setExpires,   setLastModified,   setLocale,   setMaxAge,   writeTo,   writeTo
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.opensymphony.oscache.web.filter.ResponseContent Detail:
 public  void commit() 
    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.
 public String getContentEncoding() 
 public String getContentType() 
 public long getExpires() 
 public long getLastModified() 
 public long getMaxAge() 
    Returns the max age of the content in miliseconds. If expires header and cache control are enabled both, both will be equal.
 public OutputStream getOutputStream() 
    Get an output stream. This is used by the SplitServletOutputStream to capture the original (uncached) response into a byte array.
 public int getSize() 
    Gets the size of this cached content.
 public boolean isContentGZiped() 
 public  void setContentEncoding(String contentEncoding) 
 public  void setContentType(String value) 
    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.
 public  void setExpires(long value) 
    Sets the expires date and time in miliseconds.
 public  void setLastModified(long value) 
 public  void setLocale(Locale value) 
    Set the Locale. We capture this so that when we serve this data from cache, we can set the correct locale on the response.
 public  void setMaxAge(long value) 
    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.
 public  void writeTo(ServletResponse response) throws IOException 
    Writes this cached data out to the supplied ServletResponse.
 public  void writeTo(ServletResponse response,
    boolean fragment,
    boolean acceptsGZip) throws IOException 
    Writes this cached data out to the supplied ServletResponse.