public class InMemoryResponse extends HttpServletResponseWrapper implements Serializable
SC_ACCEPTED, SC_BAD_GATEWAY, SC_BAD_REQUEST, SC_CONFLICT, SC_CONTINUE, SC_CREATED, SC_EXPECTATION_FAILED, SC_FORBIDDEN, SC_FOUND, 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 |
|---|
InMemoryResponse(HttpServletResponse response,
OutputStream baos) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCookie(Cookie cookie) |
void |
addDateHeader(String s,
long l) |
void |
addHeader(String s,
String s2) |
void |
addIntHeader(String s,
int i) |
boolean |
containsHeader(String s) |
void |
flushBuffer() |
int |
getContentLength() |
String |
getContentType() |
Collection<Cookie> |
getCookies() |
String |
getHeader(String s) |
Collection<String> |
getHeaderNames() |
Map<String,List<Serializable>> |
getHeaders() |
Collection<String> |
getHeaders(String s) |
ServletOutputStream |
getOutputStream() |
int |
getStatus() |
PrintWriter |
getWriter() |
void |
reset() |
void |
sendError(int i) |
void |
sendError(int i,
String s) |
void |
sendRedirect(String s) |
void |
setContentLength(int i) |
void |
setContentType(String s) |
void |
setDateHeader(String s,
long l) |
void |
setHeader(String s,
String s2) |
void |
setIntHeader(String s,
int i) |
void |
setStatus(int i) |
void |
setStatus(int i,
String s) |
encodeRedirectUrl, encodeRedirectURL, encodeUrl, encodeURLgetBufferSize, getCharacterEncoding, getLocale, getResponse, isCommitted, isWrapperFor, isWrapperFor, resetBuffer, setBufferSize, setCharacterEncoding, setLocale, setResponseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBufferSize, getCharacterEncoding, getLocale, isCommitted, resetBuffer, setBufferSize, setCharacterEncoding, setLocalepublic InMemoryResponse(HttpServletResponse response, OutputStream baos)
public void addCookie(Cookie cookie)
addCookie in interface HttpServletResponseaddCookie in class HttpServletResponseWrapperpublic void addDateHeader(String s, long l)
addDateHeader in interface HttpServletResponseaddDateHeader in class HttpServletResponseWrapperpublic void addHeader(String s, String s2)
addHeader in interface HttpServletResponseaddHeader in class HttpServletResponseWrapperpublic void addIntHeader(String s, int i)
addIntHeader in interface HttpServletResponseaddIntHeader in class HttpServletResponseWrapperpublic boolean containsHeader(String s)
containsHeader in interface HttpServletResponsecontainsHeader in class HttpServletResponseWrapperpublic String getHeader(String s)
getHeader in interface HttpServletResponsegetHeader in class HttpServletResponseWrapperpublic Collection<String> getHeaderNames()
getHeaderNames in interface HttpServletResponsegetHeaderNames in class HttpServletResponseWrapperpublic Collection<String> getHeaders(String s)
getHeaders in interface HttpServletResponsegetHeaders in class HttpServletResponseWrapperpublic int getStatus()
getStatus in interface HttpServletResponsegetStatus in class HttpServletResponseWrapperpublic void sendError(int i) throws IOException
sendError in interface HttpServletResponsesendError in class HttpServletResponseWrapperIOExceptionpublic void sendError(int i, String s) throws IOException
sendError in interface HttpServletResponsesendError in class HttpServletResponseWrapperIOExceptionpublic void sendRedirect(String s) throws IOException
sendRedirect in interface HttpServletResponsesendRedirect in class HttpServletResponseWrapperIOExceptionpublic void setDateHeader(String s, long l)
setDateHeader in interface HttpServletResponsesetDateHeader in class HttpServletResponseWrapperpublic void setHeader(String s, String s2)
setHeader in interface HttpServletResponsesetHeader in class HttpServletResponseWrapperpublic void setIntHeader(String s, int i)
setIntHeader in interface HttpServletResponsesetIntHeader in class HttpServletResponseWrapperpublic void setStatus(int i)
setStatus in interface HttpServletResponsesetStatus in class HttpServletResponseWrapperpublic void setStatus(int i, String s)
setStatus in interface HttpServletResponsesetStatus in class HttpServletResponseWrapperpublic String getContentType()
getContentType in interface ServletResponsegetContentType in class ServletResponseWrapperpublic ServletOutputStream getOutputStream() throws IOException
getOutputStream in interface ServletResponsegetOutputStream in class ServletResponseWrapperIOExceptionpublic PrintWriter getWriter() throws IOException
getWriter in interface ServletResponsegetWriter in class ServletResponseWrapperIOExceptionpublic void reset()
reset in interface ServletResponsereset in class ServletResponseWrapperpublic void setContentLength(int i)
setContentLength in interface ServletResponsesetContentLength in class ServletResponseWrapperpublic void setContentType(String s)
setContentType in interface ServletResponsesetContentType in class ServletResponseWrapperpublic void flushBuffer() throws IOException
flushBuffer in interface ServletResponseflushBuffer in class ServletResponseWrapperIOExceptionpublic int getContentLength()
public Collection<Cookie> getCookies()
public Map<String,List<Serializable>> getHeaders()
Copyright © 2002–2018 The Apache Software Foundation. All rights reserved.