public class MockResponse<T> extends StResponse
Constructor and Description |
---|
MockResponse() |
Modifier and Type | Method and Description |
---|---|
javax.servlet.http.Cookie |
addCookie(javax.servlet.http.Cookie cookie) |
StResponse |
addHeader(String name,
String value) |
Map |
asMap() |
<T> T |
asObject(Class<? extends T> cls) |
String |
getContent() |
javax.servlet.http.Cookie |
getCookie(String name) |
String |
getHeader(String name) |
javax.servlet.ServletOutputStream |
getOutputStream() |
int |
getStatus() |
PrintWriter |
getWriter() |
void |
setContentLength(int length) |
StResponse |
setContentType(String contentType) |
StResponse |
setDateHeader(String name,
Long value) |
StResponse |
setDefaultContentType(String contentType) |
StResponse |
setStatus(int sc) |
addCookie, addCookie, getContentType, getHttpServletResponse, getMeta, getPageFooterLiterals, getPageHeadLiterals, getSandboxedResponse, isContentTypeSet, setMeta
public MockResponse()
public StResponse setDefaultContentType(String contentType)
setDefaultContentType
in class StResponse
public StResponse setContentType(String contentType)
setContentType
in class StResponse
public StResponse setStatus(int sc)
setStatus
in class StResponse
public int getStatus()
getStatus
in class StResponse
public PrintWriter getWriter() throws IOException
getWriter
in class StResponse
IOException
public String getContent()
public StResponse addHeader(String name, String value)
addHeader
in class StResponse
public javax.servlet.ServletOutputStream getOutputStream() throws IOException
getOutputStream
in class StResponse
IOException
public StResponse setDateHeader(String name, Long value)
setDateHeader
in class StResponse
public void setContentLength(int length)
setContentLength
in class StResponse
public String getHeader(String name)
getHeader
in class StResponse
public javax.servlet.http.Cookie addCookie(javax.servlet.http.Cookie cookie)
addCookie
in class StResponse
Copyright © 2016. All rights reserved.