public class XINSServletResponse extends Object implements 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 and Description |
|---|
XINSServletResponse()
Creates a new instance of
XINSServletResponse. |
| Modifier and Type | Method and Description |
|---|---|
void |
addCookie(Cookie cookie) |
void |
addDateHeader(String str,
long param) |
void |
addHeader(String str,
String str1) |
void |
addIntHeader(String str,
int param) |
boolean |
containsHeader(String str) |
String |
encodeRedirectUrl(String str) |
String |
encodeRedirectURL(String str) |
String |
encodeUrl(String url) |
String |
encodeURL(String url) |
void |
flushBuffer() |
int |
getBufferSize() |
String |
getCharacterEncoding() |
String |
getContentType()
Gets the type of the returned content.
|
Map<String,String> |
getHeaders()
Gets the headers to return to the client.
|
Locale |
getLocale() |
ServletOutputStream |
getOutputStream() |
String |
getResult()
Gets the returned message from the servlet.
|
int |
getStatus()
Gets the status of the returned message.
|
PrintWriter |
getWriter() |
boolean |
isCommitted() |
void |
reset() |
void |
resetBuffer() |
void |
sendError(int sc) |
void |
sendError(int sc,
String msg) |
void |
sendRedirect(String location) |
void |
setBufferSize(int param) |
void |
setContentLength(int param) |
void |
setContentType(String type)
Sets the content type.
|
void |
setDateHeader(String str,
long param) |
void |
setHeader(String str,
String str1) |
void |
setIntHeader(String str,
int param) |
void |
setLocale(Locale locale) |
void |
setStatus(int sc) |
void |
setStatus(int param,
String str) |
public XINSServletResponse()
XINSServletResponse.public void addDateHeader(String str, long param)
addDateHeader in interface HttpServletResponsepublic void setDateHeader(String str, long param)
setDateHeader in interface HttpServletResponsepublic String encodeUrl(String url)
encodeUrl in interface HttpServletResponsepublic String encodeURL(String url)
encodeURL in interface HttpServletResponsepublic String encodeRedirectUrl(String str)
encodeRedirectUrl in interface HttpServletResponsepublic String encodeRedirectURL(String str)
encodeRedirectURL in interface HttpServletResponsepublic boolean containsHeader(String str)
containsHeader in interface HttpServletResponsepublic void sendRedirect(String location)
sendRedirect in interface HttpServletResponsepublic void setContentType(String type) throws IllegalArgumentException
setContentType in interface ServletResponsetype - the content type, cannot be null.IllegalArgumentException - if type == null.public void setStatus(int sc)
setStatus in interface HttpServletResponsepublic void sendError(int sc)
sendError in interface HttpServletResponsepublic void setBufferSize(int param)
setBufferSize in interface ServletResponsepublic void setContentLength(int param)
setContentLength in interface ServletResponsepublic void addCookie(Cookie cookie)
addCookie in interface HttpServletResponsepublic void setLocale(Locale locale)
setLocale in interface ServletResponsepublic void setStatus(int param,
String str)
setStatus in interface HttpServletResponsepublic void setIntHeader(String str, int param)
setIntHeader in interface HttpServletResponsepublic void addIntHeader(String str, int param)
addIntHeader in interface HttpServletResponsepublic void sendError(int sc,
String msg)
sendError in interface HttpServletResponsepublic void setHeader(String str, String str1)
setHeader in interface HttpServletResponsepublic Locale getLocale()
getLocale in interface ServletResponsepublic String getCharacterEncoding()
getCharacterEncoding in interface ServletResponsepublic int getBufferSize()
getBufferSize in interface ServletResponsepublic void flushBuffer()
flushBuffer in interface ServletResponsepublic void addHeader(String str, String str1)
addHeader in interface HttpServletResponsepublic ServletOutputStream getOutputStream()
getOutputStream in interface ServletResponsepublic PrintWriter getWriter()
getWriter in interface ServletResponsepublic boolean isCommitted()
isCommitted in interface ServletResponsepublic void reset()
reset in interface ServletResponsepublic void resetBuffer()
resetBuffer in interface ServletResponsepublic String getResult()
null if no message is returned.public int getStatus()
public String getContentType()
null.setContentType(String)See http://www.xins.org/.