Home » apache-tomcat-6.0.26-src » javax » servlet » [javadoc | source]
javax.servlet
public class: ServletResponseWrapper [javadoc | source]
java.lang.Object
   javax.servlet.ServletResponseWrapper

All Implemented Interfaces:
    ServletResponse

Direct Known Subclasses:
    HttpServletResponseWrapper, NoBodyResponse

Provides a convenient implementation of the ServletResponse interface that can be subclassed by developers wishing to adapt the response from a Servlet. This class implements the Wrapper or Decorator pattern. Methods default to calling through to the wrapped response object.
Constructor:
 public ServletResponseWrapper(ServletResponse response) 
    Creates a ServletResponse adaptor wrapping the given response object.
    Throws:
    java.lang.IllegalArgumentException - if the response is null.
Method from javax.servlet.ServletResponseWrapper Summary:
flushBuffer,   getBufferSize,   getCharacterEncoding,   getContentType,   getLocale,   getOutputStream,   getResponse,   getWriter,   isCommitted,   reset,   resetBuffer,   setBufferSize,   setCharacterEncoding,   setContentLength,   setContentType,   setLocale,   setResponse
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.servlet.ServletResponseWrapper Detail:
 public  void flushBuffer() throws IOException 
    The default behavior of this method is to call flushBuffer() on the wrapped response object.
 public int getBufferSize() 
    The default behavior of this method is to return getBufferSize() on the wrapped response object.
 public String getCharacterEncoding() 
    The default behavior of this method is to return getCharacterEncoding() on the wrapped response object.
 public String getContentType() 
    The default behavior of this method is to return getContentType() on the wrapped response object.
 public Locale getLocale() 
    The default behavior of this method is to return getLocale() on the wrapped response object.
 public ServletOutputStream getOutputStream() throws IOException 
    The default behavior of this method is to return getOutputStream() on the wrapped response object.
 public ServletResponse getResponse() 
    Return the wrapped ServletResponse object.
 public PrintWriter getWriter() throws IOException 
    The default behavior of this method is to return getWriter() on the wrapped response object.
 public boolean isCommitted() 
    The default behavior of this method is to return isCommitted() on the wrapped response object.
 public  void reset() 
    The default behavior of this method is to call reset() on the wrapped response object.
 public  void resetBuffer() 
    The default behavior of this method is to call resetBuffer() on the wrapped response object.
 public  void setBufferSize(int size) 
    The default behavior of this method is to call setBufferSize(int size) on the wrapped response object.
 public  void setCharacterEncoding(String charset) 
    The default behavior of this method is to call setCharacterEncoding(String charset) on the wrapped response object.
 public  void setContentLength(int len) 
    The default behavior of this method is to call setContentLength(int len) on the wrapped response object.
 public  void setContentType(String type) 
    The default behavior of this method is to call setContentType(String type) on the wrapped response object.
 public  void setLocale(Locale loc) 
    The default behavior of this method is to call setLocale(Locale loc) on the wrapped response object.
 public  void setResponse(ServletResponse response) 
    Sets the response being wrapped.