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 HttpServletResponse
public void setDateHeader(String str, long param)
setDateHeader
in interface HttpServletResponse
public String encodeUrl(String url)
encodeUrl
in interface HttpServletResponse
public String encodeURL(String url)
encodeURL
in interface HttpServletResponse
public String encodeRedirectUrl(String str)
encodeRedirectUrl
in interface HttpServletResponse
public String encodeRedirectURL(String str)
encodeRedirectURL
in interface HttpServletResponse
public boolean containsHeader(String str)
containsHeader
in interface HttpServletResponse
public void sendRedirect(String location)
sendRedirect
in interface HttpServletResponse
public void setContentType(String type) throws IllegalArgumentException
setContentType
in interface ServletResponse
type
- the content type, cannot be null
.IllegalArgumentException
- if type == null
.public void setStatus(int sc)
setStatus
in interface HttpServletResponse
public void sendError(int sc)
sendError
in interface HttpServletResponse
public void setBufferSize(int param)
setBufferSize
in interface ServletResponse
public void setContentLength(int param)
setContentLength
in interface ServletResponse
public void addCookie(Cookie cookie)
addCookie
in interface HttpServletResponse
public void setLocale(Locale locale)
setLocale
in interface ServletResponse
public void setStatus(int param, String str)
setStatus
in interface HttpServletResponse
public void setIntHeader(String str, int param)
setIntHeader
in interface HttpServletResponse
public void addIntHeader(String str, int param)
addIntHeader
in interface HttpServletResponse
public void sendError(int sc, String msg)
sendError
in interface HttpServletResponse
public void setHeader(String str, String str1)
setHeader
in interface HttpServletResponse
public Locale getLocale()
getLocale
in interface ServletResponse
public String getCharacterEncoding()
getCharacterEncoding
in interface ServletResponse
public int getBufferSize()
getBufferSize
in interface ServletResponse
public void flushBuffer()
flushBuffer
in interface ServletResponse
public void addHeader(String str, String str1)
addHeader
in interface HttpServletResponse
public ServletOutputStream getOutputStream()
getOutputStream
in interface ServletResponse
public PrintWriter getWriter()
getWriter
in interface ServletResponse
public boolean isCommitted()
isCommitted
in interface ServletResponse
public void reset()
reset
in interface ServletResponse
public void resetBuffer()
resetBuffer
in interface ServletResponse
public String getResult()
null
if no message is returned.public int getStatus()
public String getContentType()
null
.setContentType(String)
See http://www.xins.org/.