org.apache.cocoon.portal.pluto.servlet
Class ServletResponseImpl

java.lang.Object
  extended by javax.servlet.http.HttpServletResponseWrapper
      extended by org.apache.cocoon.portal.pluto.servlet.ServletResponseImpl
All Implemented Interfaces:
HttpServletResponse, ServletResponse

public class ServletResponseImpl
extends HttpServletResponseWrapper

Our response wrapper

Version:
CVS $Id: ServletResponseImpl.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Carsten Ziegeler

Nested Class Summary
protected static class ServletResponseImpl.MyOutputStream
           
 
Field Summary
protected  int bufferSize
           
protected  boolean committed
           
protected  String encoding
           
protected  String redirectURL
           
protected  ServletResponseImpl.MyOutputStream stream
           
protected  PrintWriter writer
           
 
Fields inherited from interface javax.servlet.http.HttpServletResponse
SC_ACCEPTED, SC_BAD_GATEWAY, SC_BAD_REQUEST, SC_CONFLICT, SC_CONTINUE, SC_CREATED, SC_EXPECTATION_FAILED, SC_FORBIDDEN, SC_GATEWAY_TIMEOUT, SC_GONE, SC_HTTP_VERSION_NOT_SUPPORTED, SC_INTERNAL_SERVER_ERROR, SC_LENGTH_REQUIRED, SC_METHOD_NOT_ALLOWED, SC_MOVED_PERMANENTLY, SC_MOVED_TEMPORARILY, SC_MULTIPLE_CHOICES, SC_NO_CONTENT, SC_NON_AUTHORITATIVE_INFORMATION, SC_NOT_ACCEPTABLE, SC_NOT_FOUND, SC_NOT_IMPLEMENTED, SC_NOT_MODIFIED, SC_OK, SC_PARTIAL_CONTENT, SC_PAYMENT_REQUIRED, SC_PRECONDITION_FAILED, SC_PROXY_AUTHENTICATION_REQUIRED, SC_REQUEST_ENTITY_TOO_LARGE, SC_REQUEST_TIMEOUT, SC_REQUEST_URI_TOO_LONG, SC_REQUESTED_RANGE_NOT_SATISFIABLE, SC_RESET_CONTENT, SC_SEE_OTHER, SC_SERVICE_UNAVAILABLE, SC_SWITCHING_PROTOCOLS, SC_TEMPORARY_REDIRECT, SC_UNAUTHORIZED, SC_UNSUPPORTED_MEDIA_TYPE, SC_USE_PROXY
 
Constructor Summary
ServletResponseImpl(HttpServletResponse response)
           
 
Method Summary
 void flushBuffer()
           
 int getBufferSize()
           
 String getContent()
          Return the content of the portlet
 ServletOutputStream getOutputStream()
           
 String getRedirectURL()
          Get redirect url
 PrintWriter getWriter()
           
 boolean isCommitted()
           
 void reset()
           
 void resetBuffer()
           
 void sendError(int arg0)
           
 void sendError(int arg0, String arg1)
           
 void sendRedirect(String arg0)
           
 void setBufferSize(int arg0)
           
 void setCharacterEncoding(String enc)
           
 void setContentLength(int arg0)
           
 void setContentType(String typeInfo)
           
 void setLocale(Locale locale)
           
 void setStatus(int arg0)
           
 void setStatus(int arg0, String arg1)
           
 String toString()
           
 
Methods inherited from class javax.servlet.http.HttpServletResponseWrapper
addCookie, addDateHeader, addHeader, addIntHeader, containsHeader, encodeRedirectUrl, encodeRedirectURL, encodeUrl, encodeURL, getCharacterEncoding, getLocale, getResponse, setDateHeader, setHeader, setIntHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

stream

protected ServletResponseImpl.MyOutputStream stream

writer

protected PrintWriter writer

committed

protected boolean committed

bufferSize

protected int bufferSize

redirectURL

protected String redirectURL

encoding

protected String encoding
Constructor Detail

ServletResponseImpl

public ServletResponseImpl(HttpServletResponse response)
Method Detail

getContent

public String getContent()
Return the content of the portlet


getRedirectURL

public String getRedirectURL()
Get redirect url


toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

sendError

public void sendError(int arg0,
                      String arg1)
               throws IOException
Specified by:
sendError in interface HttpServletResponse
Overrides:
sendError in class HttpServletResponseWrapper
Throws:
IOException
See Also:
HttpServletResponse.sendError(int, String)

sendError

public void sendError(int arg0)
               throws IOException
Specified by:
sendError in interface HttpServletResponse
Overrides:
sendError in class HttpServletResponseWrapper
Throws:
IOException
See Also:
HttpServletResponse.sendError(int)

sendRedirect

public void sendRedirect(String arg0)
                  throws IOException
Specified by:
sendRedirect in interface HttpServletResponse
Overrides:
sendRedirect in class HttpServletResponseWrapper
Throws:
IOException
See Also:
HttpServletResponse.sendRedirect(java.lang.String)

setStatus

public void setStatus(int arg0,
                      String arg1)
Specified by:
setStatus in interface HttpServletResponse
Overrides:
setStatus in class HttpServletResponseWrapper
See Also:
HttpServletResponse.setStatus(int, String)

setStatus

public void setStatus(int arg0)
Specified by:
setStatus in interface HttpServletResponse
Overrides:
setStatus in class HttpServletResponseWrapper
See Also:
HttpServletResponse.setStatus(int)

flushBuffer

public void flushBuffer()
                 throws IOException
Specified by:
flushBuffer in interface ServletResponse
Overrides:
flushBuffer in class HttpServletResponseWrapper
Throws:
IOException
See Also:
ServletResponse.flushBuffer()

getBufferSize

public int getBufferSize()
Specified by:
getBufferSize in interface ServletResponse
Overrides:
getBufferSize in class HttpServletResponseWrapper
See Also:
ServletResponse.getBufferSize()

getOutputStream

public ServletOutputStream getOutputStream()
                                    throws IOException
Specified by:
getOutputStream in interface ServletResponse
Overrides:
getOutputStream in class HttpServletResponseWrapper
Throws:
IOException
See Also:
ServletResponse.getOutputStream()

getWriter

public PrintWriter getWriter()
                      throws IOException
Specified by:
getWriter in interface ServletResponse
Overrides:
getWriter in class HttpServletResponseWrapper
Throws:
IOException
See Also:
ServletResponse.getWriter()

isCommitted

public boolean isCommitted()
Specified by:
isCommitted in interface ServletResponse
Overrides:
isCommitted in class HttpServletResponseWrapper
See Also:
ServletResponse.isCommitted()

reset

public void reset()
Specified by:
reset in interface ServletResponse
Overrides:
reset in class HttpServletResponseWrapper
See Also:
ServletResponse.reset()

setBufferSize

public void setBufferSize(int arg0)
Specified by:
setBufferSize in interface ServletResponse
Overrides:
setBufferSize in class HttpServletResponseWrapper
See Also:
ServletResponse.setBufferSize(int)

setContentLength

public void setContentLength(int arg0)
Specified by:
setContentLength in interface ServletResponse
Overrides:
setContentLength in class HttpServletResponseWrapper
See Also:
ServletResponse.setContentLength(int)

setContentType

public void setContentType(String typeInfo)
Specified by:
setContentType in interface ServletResponse
Overrides:
setContentType in class HttpServletResponseWrapper
See Also:
ServletResponse.setContentType(java.lang.String)

setCharacterEncoding

public void setCharacterEncoding(String enc)

setLocale

public void setLocale(Locale locale)
Specified by:
setLocale in interface ServletResponse
Overrides:
setLocale in class HttpServletResponseWrapper
See Also:
ServletResponse.setLocale(java.util.Locale)

resetBuffer

public void resetBuffer()
See Also:
javax.servlet.ServletResponse#resetBuffer()


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.