Java org.springframework.mock.web MockHttpServletResponse fields, constructors, methods, implement or subclass

Example usage for Java org.springframework.mock.web MockHttpServletResponse fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.springframework.mock.web MockHttpServletResponse.

The text is from its open source code.

Subclass

org.springframework.mock.web.MockHttpServletResponse has subclasses.
Click this link to see all its subclasses.

Constructor

Method

voidaddHeader(String name, String value)
booleancontainsHeader(String name)
voidflushBuffer()
StringgetCharacterEncoding()
byte[]getContentAsByteArray()
StringgetContentAsString()
Get the content of the response body as a String , using the charset specified for the response by the application, either through HttpServletResponse methods or through a charset parameter on the Content-Type .
intgetContentLength()
StringgetContentType()
CookiegetCookie(String name)
Cookie[]getCookies()
StringgetErrorMessage()
StringgetForwardedUrl()
StringgetHeader(String name)
Return the primary value for the given header as a String, if any.
CollectiongetHeaderNames()
Return the names of all specified headers as a Set of Strings.
ListgetHeaders(String name)
Return all values for the given header as a List of Strings.
ObjectgetHeaderValue(String name)
Return the primary value for the given header, if any.
LocalegetLocale()
ServletOutputStreamgetOutputStream()
StringgetRedirectedUrl()
intgetStatus()
PrintWritergetWriter()
booleanisCommitted()
voidsetCharacterEncoding(String characterEncoding)
voidsetCommitted(boolean committed)
voidsetContentType(@Nullable String contentType)
voidsetOutputStreamAccessAllowed(boolean outputStreamAccessAllowed)
Set whether #getOutputStream() access is allowed.
voidsetStatus(int status)
voidsetWriterAccessAllowed(boolean writerAccessAllowed)
Set whether #getWriter() access is allowed.