public class XDBServletResponse extends javax.servlet.ServletOutputStream implements javax.servlet.http.HttpServletResponse, XDBStream
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_UNAUTHORIZED, SC_UNSUPPORTED_MEDIA_TYPE, SC_USE_PROXY| Modifier and Type | Method and Description |
|---|---|
void |
addCookie(javax.servlet.http.Cookie cookie)
Add a cookie
|
void |
addDateHeader(java.lang.String name, long date)
Add header whose value is a date.
|
void |
addHeader(java.lang.String name, java.lang.String value)
Add header.
|
void |
addIntHeader(java.lang.String name, int value)
Add header whose value is an int.
|
void |
close()
Close this response.
|
boolean |
containsHeader(java.lang.String name)
Is this header present?
|
java.lang.String |
encodeRedirectUrl(java.lang.String url)
Deprecated.
|
java.lang.String |
encodeRedirectURL(java.lang.String url)
Encode URL.
|
java.lang.String |
encodeUrl(java.lang.String url)
Deprecated.
|
java.lang.String |
encodeURL(java.lang.String url)
Encode URL.
|
void |
flush()
Flush the contents.
|
void |
flushBuffer()
Flush the buffer.
|
int |
getBufferSize()
Get buffer size.
|
java.lang.String |
getCharacterEncoding()
Get character encoding.
|
java.util.Locale |
getLocale()
Get locale.
|
javax.servlet.ServletOutputStream |
getOutputStream()
Get output stream.
|
java.io.PrintWriter |
getWriter()
Get print writer
|
boolean |
isCommitted()
Is this response committed?
|
void |
print(java.lang.String s)
Print given string to writer.
|
void |
println(java.lang.String s)
Print given string to writer with a newline.
|
void |
reset()
Reset this response.
|
void |
sendError(int sc)
Send error with null message.
|
void |
sendError(int sc, java.lang.String msg)
Send error message.
|
void |
sendRedirect(java.lang.String location)
Send redirect to location.
|
void |
setBufferSize(int size)
Set buffer size
|
void |
setContentLength(int len)
Set content length
|
void |
setContentType(java.lang.String type)
Set content type
|
void |
setDateHeader(java.lang.String name, long date)
Set header whose value is a date.
|
void |
setHeader(java.lang.String name, java.lang.String value)
Set header.
|
void |
setIntHeader(java.lang.String name, int value)
Set header whose value is an int.
|
void |
setLocale(java.util.Locale loc)
Set Locale
|
void |
setStatus(int sc)
Set status code
|
void |
setStatus(int sc, java.lang.String ms)
Deprecated.
|
void |
write(byte[] b)
Write data
|
void |
write(byte[] b, int off, int len)
Write data
|
void |
write(int b)
Write data
|
void |
writeXMLNative(long xobCState, java.lang.String encoding, short indent)
Write native XML.
|
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOException - if there is an error in the IO.
public final void print(java.lang.String s)
throws java.io.IOException
print in class javax.servlet.ServletOutputStreams - String to be printed.java.io.IOException - if there is an IO error.
public void println(java.lang.String s)
throws java.io.IOException
println in class javax.servlet.ServletOutputStreams - String to be printed.java.io.IOException - if there is an IO error.
public final void write(byte[] b)
throws java.io.IOException
write in class java.io.OutputStreamb - The array of bytes to write.java.io.IOException - if there is an IO error.
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamb - The array of bytes to write.off - The offset.len - The length.java.io.IOException - if there is an IO error.
public final void writeXMLNative(long xobCState,
java.lang.String encoding,
short indent)
throws java.io.IOException
writeXMLNative in interface XDBStreamxobCstate - The pointer to the xob in C.encoding - The character encoding to be used when writing.indent - The indentation to be used.java.io.IOException - if there is an IO error.
public final void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamb - The number of bytes to write.java.io.IOException - if there is an IO error.
public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOException - if there is an error in the IO.
public void flushBuffer()
throws java.io.IOException
flushBuffer in interface javax.servlet.ServletResponsejava.io.IOException - if there is an error in the IO.public final int getBufferSize()
getBufferSize in interface javax.servlet.ServletResponsepublic final java.lang.String getCharacterEncoding()
getCharacterEncoding in interface javax.servlet.ServletResponsepublic final java.util.Locale getLocale()
getLocale in interface javax.servlet.ServletResponsepublic final javax.servlet.ServletOutputStream getOutputStream()
getOutputStream in interface javax.servlet.ServletResponse
public final java.io.PrintWriter getWriter()
throws java.io.IOException
getWriter in interface javax.servlet.ServletResponsejava.io.IOException - if there is an error in the IO.public boolean isCommitted()
isCommitted in interface javax.servlet.ServletResponsepublic final void reset()
reset in interface javax.servlet.ServletResponsepublic final void setBufferSize(int size)
setBufferSize in interface javax.servlet.ServletResponsesize - new size.public final void setContentType(java.lang.String type)
setContentType in interface javax.servlet.ServletResponsetype - the content typepublic final void setContentLength(int len)
setContentLength in interface javax.servlet.ServletResponselen - content lengthpublic final void setLocale(java.util.Locale loc)
setLocale in interface javax.servlet.ServletResponseloc - localepublic final void addCookie(javax.servlet.http.Cookie cookie)
addCookie in interface javax.servlet.http.HttpServletResponsecookie - The cookie to be added.
public final void addHeader(java.lang.String name,
java.lang.String value)
addHeader in interface javax.servlet.http.HttpServletResponsename - The name of the header.value - The value of the header.
public final void addDateHeader(java.lang.String name,
long date)
addDateHeader in interface javax.servlet.http.HttpServletResponsename - The name of the header.date - The date value of the header.
public final void addIntHeader(java.lang.String name,
int value)
addIntHeader in interface javax.servlet.http.HttpServletResponsename - The name of the header.value - The int value of the header.public final boolean containsHeader(java.lang.String name)
containsHeader in interface javax.servlet.http.HttpServletResponsename - The name of the header.public final java.lang.String encodeRedirectUrl(java.lang.String url)
encodeRedirectUrl in interface javax.servlet.http.HttpServletResponsepublic final java.lang.String encodeRedirectURL(java.lang.String url)
encodeRedirectURL in interface javax.servlet.http.HttpServletResponseurl - The URL to be encoded.public final java.lang.String encodeUrl(java.lang.String url)
encodeUrl in interface javax.servlet.http.HttpServletResponsepublic final java.lang.String encodeURL(java.lang.String url)
encodeURL in interface javax.servlet.http.HttpServletResponseurl - The URL to be encoded.public final void sendError(int sc)
sendError in interface javax.servlet.http.HttpServletResponsesc - Status code of the error.
public final void sendError(int sc,
java.lang.String msg)
sendError in interface javax.servlet.http.HttpServletResponsesc - Status code of the error.msg - The error message.
public final void sendRedirect(java.lang.String location)
throws java.io.IOException
sendRedirect in interface javax.servlet.http.HttpServletResponselocation - The location to which to redirect.java.io.IOException - if there is an error in the IO.
public final void setDateHeader(java.lang.String name,
long date)
setDateHeader in interface javax.servlet.http.HttpServletResponsename - The name of the header.date - The date value of the header.
public final void setHeader(java.lang.String name,
java.lang.String value)
setHeader in interface javax.servlet.http.HttpServletResponsename - The name of the header.value - The value of the header.
public final void setIntHeader(java.lang.String name,
int value)
setIntHeader in interface javax.servlet.http.HttpServletResponsename - The name of the header.value - The int value of the header.public final void setStatus(int sc)
setStatus in interface javax.servlet.http.HttpServletResponsesc - status code.
public final void setStatus(int sc,
java.lang.String ms)
setStatus in interface javax.servlet.http.HttpServletResponse