public class ServletResponseAdapter extends java.lang.Object implements HttpResponse
Constructor and Description |
---|
ServletResponseAdapter(HttpServletResponse response) |
Modifier and Type | Method and Description |
---|---|
void |
addCookie(Cookie cookie) |
void |
addDateHeader(java.lang.String s,
long l) |
void |
addHeader(java.lang.String s,
java.lang.String s1) |
void |
addIntHeader(java.lang.String s,
int i) |
boolean |
containsHeader(java.lang.String s) |
java.lang.String |
encodeRedirectURL(java.lang.String s) |
java.lang.String |
encodeURL(java.lang.String s) |
void |
flushBuffer()
Flushes the output buffer to the client.
|
int |
getBufferSize() |
java.lang.String |
getCharacterEncoding() |
java.lang.String |
getContentType()
Gets the content type that will be sent to the browser.
|
java.lang.String |
getHeader(java.lang.String name) |
java.util.Collection<java.lang.String> |
getHeaderNames() |
java.util.Collection<java.lang.String> |
getHeaders(java.lang.String s) |
java.util.Locale |
getLocale() |
ServletOutputStream |
getOutputStream() |
int |
getStatus() |
java.io.PrintWriter |
getWriter() |
boolean |
isCommitted() |
void |
reset() |
void |
resetBuffer() |
void |
sendError(int i) |
void |
sendError(int i,
java.lang.String s) |
void |
sendRedirect(java.lang.String s) |
void |
setBufferSize(int i) |
void |
setCharacterEncoding(java.lang.String s) |
void |
setContentLength(int i) |
void |
setContentLengthLong(long length) |
void |
setContentType(java.lang.String type)
Sets the content type to be sent back to the browser.
|
void |
setDateHeader(java.lang.String s,
long l) |
void |
setHeader(java.lang.String name,
java.lang.String value) |
void |
setIntHeader(java.lang.String s,
int i) |
void |
setLocale(java.util.Locale locale) |
void |
setStatus(int i) |
void |
setStatusMessage(java.lang.String responseString)
Sets the response string to be sent to the browser
|
public ServletResponseAdapter(HttpServletResponse response)
public void setHeader(java.lang.String name, java.lang.String value)
public void setIntHeader(java.lang.String s, int i)
public void setStatus(int i)
public void addCookie(Cookie cookie)
public void addDateHeader(java.lang.String s, long l)
public void addHeader(java.lang.String s, java.lang.String s1)
public void addIntHeader(java.lang.String s, int i)
public boolean containsHeader(java.lang.String s)
public java.lang.String encodeURL(java.lang.String s)
public java.lang.String encodeRedirectURL(java.lang.String s)
public java.lang.String getHeader(java.lang.String name)
public java.util.Collection<java.lang.String> getHeaderNames()
public java.util.Collection<java.lang.String> getHeaders(java.lang.String s)
public int getStatus()
public void sendError(int i) throws java.io.IOException
java.io.IOException
public void sendError(int i, java.lang.String s) throws java.io.IOException
java.io.IOException
public void sendRedirect(java.lang.String s) throws java.io.IOException
java.io.IOException
public void setDateHeader(java.lang.String s, long l)
public ServletOutputStream getOutputStream()
public java.io.PrintWriter getWriter() throws java.io.IOException
java.io.IOException
public boolean isCommitted()
public void reset()
public void resetBuffer()
public void setBufferSize(int i)
public void setCharacterEncoding(java.lang.String s)
public void setContentLength(int i)
public void setContentLengthLong(long length)
public void setContentType(java.lang.String type)
HttpResponse
setContentType
in interface HttpResponse
type
- the type to be sent to the browser (i.e. "text/html")public void setLocale(java.util.Locale locale)
public java.lang.String getContentType()
HttpResponse
getContentType
in interface HttpResponse
public java.util.Locale getLocale()
public void setStatusMessage(java.lang.String responseString)
HttpResponse
setStatusMessage
in interface HttpResponse
responseString
- the response stringpublic void flushBuffer() throws java.io.IOException
HttpResponse
flushBuffer
in interface HttpResponse
java.io.IOException
public int getBufferSize()
public java.lang.String getCharacterEncoding()