|
DLESE Tools v1.6.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.servlet.ServletResponseWrapper
javax.servlet.http.HttpServletResponseWrapper
org.dlese.dpc.webapps.servlets.filters.CharArrayWrapper
public class CharArrayWrapper
A response wrapper that takes the servlet's or JSP's response and saves it into a char[] for use in Filters. The array can then be acted upon using a Filter to do post-processing on the respose content prior to it being sent out. See More Servlets and JavaServer Pages, chapter 9.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
CharArrayWrapper(HttpServletResponse response)
Constructor for the CharArrayWrapper object |
|
| Method Summary | |
|---|---|
int |
getContentLength()
Gets the contentLength attribute of the GenericResponseWrapper object |
String |
getContentType()
Gets the contentType attribute of the GenericResponseWrapper object |
String |
getErrorMsg()
Gets the errorMsg attribute of the CharArrayWrapper object |
int |
getStatus()
Gets the status attribute of the CharArrayWrapper object |
PrintWriter |
getWriter()
Replace the normal writer with a writer that ouputs our char[]. |
void |
sendError(int sc)
DESCRIPTION |
void |
sendError(int sc,
String msg)
DESCRIPTION |
void |
setContentLength(int length)
Sets the contentLength attribute of the GenericResponseWrapper object |
void |
setContentType(String type)
Sets the contentType attribute of the GenericResponseWrapper object |
void |
setStatus(int sc)
Sets the status attribute of the CharArrayWrapper object |
char[] |
toCharArray()
Convert to char[]. |
String |
toString()
Convert to String. |
| Methods inherited from class javax.servlet.http.HttpServletResponseWrapper |
|---|
addCookie, addDateHeader, addHeader, addIntHeader, containsHeader, encodeRedirectUrl, encodeRedirectURL, encodeUrl, encodeURL, sendRedirect, setDateHeader, setHeader, setIntHeader, setStatus |
| Methods inherited from class javax.servlet.ServletResponseWrapper |
|---|
flushBuffer, getBufferSize, getCharacterEncoding, getLocale, getOutputStream, getResponse, isCommitted, reset, resetBuffer, setBufferSize, setCharacterEncoding, setLocale, setResponse |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.servlet.ServletResponse |
|---|
flushBuffer, getBufferSize, getCharacterEncoding, getLocale, getOutputStream, isCommitted, reset, resetBuffer, setBufferSize, setCharacterEncoding, setLocale |
| Constructor Detail |
|---|
public CharArrayWrapper(HttpServletResponse response)
response - The HttpServletResponse.| Method Detail |
|---|
public PrintWriter getWriter()
getWriter in interface ServletResponsegetWriter in class ServletResponseWrapperpublic String toString()
toString in class Objectpublic char[] toCharArray()
public void sendError(int sc)
throws IOException
sendError in interface HttpServletResponsesendError in class HttpServletResponseWrappersc - DESCRIPTION
IOException - DESCRIPTION
public void sendError(int sc,
String msg)
throws IOException
sendError in interface HttpServletResponsesendError in class HttpServletResponseWrappersc - DESCRIPTIONmsg - DESCRIPTION
IOException - DESCRIPTIONpublic void setStatus(int sc)
setStatus in interface HttpServletResponsesetStatus in class HttpServletResponseWrappersc - The new status valuepublic int getStatus()
public String getErrorMsg()
public void setContentLength(int length)
setContentLength in interface ServletResponsesetContentLength in class ServletResponseWrapperlength - The new contentLength valuepublic int getContentLength()
public void setContentType(String type)
setContentType in interface ServletResponsesetContentType in class ServletResponseWrappertype - The new contentType valuepublic String getContentType()
getContentType in interface ServletResponsegetContentType in class ServletResponseWrapper
|
DLESE Tools v1.6.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||