Package org.springframework.mock.http
Class MockHttpInputMessage
java.lang.Object
org.springframework.mock.http.MockHttpInputMessage
- All Implemented Interfaces:
HttpInputMessage
,HttpMessage
- Direct Known Subclasses:
MockClientHttpResponse
Mock implementation of
HttpInputMessage
.- Since:
- 3.2
- Author:
- Rossen Stoyanchev
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetBody()
Return the body of the message as an input stream.Return the headers of this message.
-
Constructor Details
-
MockHttpInputMessage
public MockHttpInputMessage(byte[] content) -
MockHttpInputMessage
-
-
Method Details
-
getHeaders
Description copied from interface:HttpMessage
Return the headers of this message.- Specified by:
getHeaders
in interfaceHttpMessage
- Returns:
- a corresponding HttpHeaders object (never
null
)
-
getBody
Description copied from interface:HttpInputMessage
Return the body of the message as an input stream.- Specified by:
getBody
in interfaceHttpInputMessage
- Returns:
- the input stream body (never
null
) - Throws:
IOException
- in case of I/O errors
-