javax.servlet
Class ServletResponseWrapper
java.lang.Object
javax.servlet.ServletResponseWrapper
- ServletResponse
public class ServletResponseWrapper
extends java.lang.Object
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.
- v 2.3
ServletResponse
void | flushBuffer() - The default behavior of this method is to call flushBuffer()
on the wrapped response object.
|
int | getBufferSize() - The default behavior of this method is to return getBufferSize()
on the wrapped response object.
|
java.lang.String | getCharacterEncoding() - The default behavior of this method is to return getCharacterEncoding()
on the wrapped response object.
|
java.util.Locale | getLocale() - The default behavior of this method is to return getLocale()
on the wrapped response object.
|
ServletOutputStream | getOutputStream() - The default behavior of this method is to return getOutputStream()
on the wrapped response object.
|
ServletResponse | getResponse() - Return the wrapped ServletResponse object.
|
java.io.PrintWriter | getWriter() - The default behavior of this method is to return getWriter()
on the wrapped response object.
|
boolean | isCommitted() - The default behavior of this method is to return isCommitted()
on the wrapped response object.
|
void | reset() - The default behavior of this method is to call reset()
on the wrapped response object.
|
void | resetBuffer() - The default behavior of this method is to call resetBuffer()
on the wrapped response object.
|
void | setBufferSize(int size) - The default behavior of this method is to call setBufferSize(int size)
on the wrapped response object.
|
void | setContentLength(int len) - The default behavior of this method is to call setContentLength(int len)
on the wrapped response object.
|
void | setContentType(java.lang.String type) - The default behavior of this method is to call setContentType(String type)
on the wrapped response object.
|
void | setLocale(java.util.Locale loc) - The default behavior of this method is to call setLocale(Locale loc)
on the wrapped response object.
|
void | setResponse(ServletResponse response) - Sets the response being wrapped.
|
ServletResponseWrapper
public ServletResponseWrapper(ServletResponse response)
Creates a ServletResponse adaptor wrapping the given response object.
flushBuffer
public void flushBuffer()
throws java.io.IOException
The default behavior of this method is to call flushBuffer()
on the wrapped response object.
- flushBuffer in interface ServletResponse
getBufferSize
public int getBufferSize()
The default behavior of this method is to return getBufferSize()
on the wrapped response object.
- getBufferSize in interface ServletResponse
getCharacterEncoding
public java.lang.String getCharacterEncoding()
The default behavior of this method is to return getCharacterEncoding()
on the wrapped response object.
- getCharacterEncoding in interface ServletResponse
getLocale
public java.util.Locale getLocale()
The default behavior of this method is to return getLocale()
on the wrapped response object.
- getLocale in interface ServletResponse
getResponse
public ServletResponse getResponse()
Return the wrapped ServletResponse object.
getWriter
public java.io.PrintWriter getWriter()
throws java.io.IOException
The default behavior of this method is to return getWriter()
on the wrapped response object.
- getWriter in interface ServletResponse
isCommitted
public boolean isCommitted()
The default behavior of this method is to return isCommitted()
on the wrapped response object.
- isCommitted in interface ServletResponse
reset
public void reset()
The default behavior of this method is to call reset()
on the wrapped response object.
- reset in interface ServletResponse
resetBuffer
public void resetBuffer()
The default behavior of this method is to call resetBuffer()
on the wrapped response object.
- resetBuffer in interface ServletResponse
setBufferSize
public void setBufferSize(int size)
The default behavior of this method is to call setBufferSize(int size)
on the wrapped response object.
- setBufferSize in interface ServletResponse
setContentLength
public void setContentLength(int len)
The default behavior of this method is to call setContentLength(int len)
on the wrapped response object.
- setContentLength in interface ServletResponse
setContentType
public void setContentType(java.lang.String type)
The default behavior of this method is to call setContentType(String type)
on the wrapped response object.
- setContentType in interface ServletResponse
setLocale
public void setLocale(java.util.Locale loc)
The default behavior of this method is to call setLocale(Locale loc)
on the wrapped response object.
- setLocale in interface ServletResponse
setResponse
public void setResponse(ServletResponse response)
Sets the response being wrapped.