Class MockHttpOutputMessage
java.lang.Object
org.springframework.mock.http.MockHttpOutputMessage
- All Implemented Interfaces:
- HttpMessage, HttpOutputMessage
- Direct Known Subclasses:
- MockClientHttpRequest
Mock implementation of 
HttpOutputMessage.- Since:
- 3.2
- Author:
- Rossen Stoyanchev
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetBody()Return the body of the message as an output stream.byte[]Return the body content as a byte array.Return the body content interpreted as a UTF-8 string.getBodyAsString(Charset charset) Return the body content interpreted as a string using the supplied character set.Return the headers of this message.
- 
Constructor Details- 
MockHttpOutputMessagepublic MockHttpOutputMessage()
 
- 
- 
Method Details- 
getHeadersDescription copied from interface:HttpMessageReturn the headers of this message.- Specified by:
- getHeadersin interface- HttpMessage
- Returns:
- a corresponding HttpHeaders object (never null)
 
- 
getBodyDescription copied from interface:HttpOutputMessageReturn the body of the message as an output stream.- Specified by:
- getBodyin interface- HttpOutputMessage
- Returns:
- the output stream body (never null)
- Throws:
- IOException- in case of I/O errors
 
- 
getBodyAsBytespublic byte[] getBodyAsBytes()Return the body content as a byte array.
- 
getBodyAsStringReturn the body content interpreted as a UTF-8 string.
- 
getBodyAsString
 
-