Save This Page
Home » struts-2.1.8.1-src » org.apache » struts2 » components » [javadoc | source]
org.apache.struts2.components
static final class: Include.PageResponse [javadoc | source]
java.lang.Object
   javax.servlet.ServletResponseWrapper
      javax.servlet.http.HttpServletResponseWrapper
         org.apache.struts2.components.Include$PageResponse

All Implemented Interfaces:
    HttpServletResponse, ServletResponse

Simple wrapper to HTTPServletResponse that will allow getWriter() and getResponse() to be called as many times as needed without causing conflicts.

The underlying outputStream is a wrapper around PageOutputStream which will store the written content to a buffer.

This buffer can later be retrieved by calling #getContent .

Field Summary
protected  PrintWriter pagePrintWriter     
protected  ServletOutputStream outputStream     
Constructor:
 public PageResponse(HttpServletResponse response) 
    Create PageResponse wrapped around an existing HttpServletResponse.
Method from org.apache.struts2.components.Include$PageResponse Summary:
getContent,   getOutputStream,   getWriter
Methods from javax.servlet.http.HttpServletResponseWrapper:
addCookie,   addDateHeader,   addHeader,   addIntHeader,   containsHeader,   encodeRedirectURL,   encodeRedirectUrl,   encodeURL,   encodeUrl,   sendError,   sendError,   sendRedirect,   setDateHeader,   setHeader,   setIntHeader,   setStatus,   setStatus
Methods from javax.servlet.ServletResponseWrapper:
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 org.apache.struts2.components.Include$PageResponse Detail:
 public FastByteArrayOutputStream getContent() throws IOException 
 public ServletOutputStream getOutputStream() throws IOException 
    Return instance of PageOutputStream allowing all data written to stream to be stored in temporary buffer.
 public PrintWriter getWriter() throws IOException 
    Return PrintWriter wrapper around PageOutputStream.