public class MockHttpOutputMessage extends java.lang.Object implements HttpOutputMessage
HttpOutputMessage
.Constructor and Description |
---|
MockHttpOutputMessage() |
Modifier and Type | Method and Description |
---|---|
java.io.OutputStream |
getBody()
Return the body content.
|
byte[] |
getBodyAsBytes()
Return body content as a byte array.
|
java.lang.String |
getBodyAsString()
Return the body content interpreted as a UTF-8 string.
|
java.lang.String |
getBodyAsString(java.nio.charset.Charset charset)
Return the body content as a string.
|
HttpHeaders |
getHeaders()
Return the headers.
|
public HttpHeaders getHeaders()
getHeaders
in interface HttpMessage
public java.io.OutputStream getBody() throws java.io.IOException
getBody
in interface HttpOutputMessage
java.io.IOException
- in case of I/O Errorspublic byte[] getBodyAsBytes()
public java.lang.String getBodyAsString()
public java.lang.String getBodyAsString(java.nio.charset.Charset charset)
charset
- the charset to use to turn the body content to a String