Package org.springframework.mock.http

# Class MockHttpInputMessage

java.lang.Object
org.springframework.mock.http.MockHttpInputMessage

All Implemented Interfaces:
  `org.springframework.http.HttpInputMessage`, `org.springframework.http.HttpMessage`

Direct Known Subclasses:
  `MockClientHttpResponse`

public class MockHttpInputMessage extends Object implements org.springframework.http.HttpInputMessage
Mock implementation of `HttpInputMessage`.

Since:
  3.2
Author:
  Rossen Stoyanchev

## Constructor Summary

Constructors
Constructor
Description
`MockHttpInputMessage(byte[] body)`
Create a `MockHttpInputMessage` with the supplied body.
`MockHttpInputMessage(InputStream body)`
Create a `MockHttpInputMessage` with the supplied body.

## Method Summary

Modifier and Type
Method
Description
`InputStream`
`getBody()`
`org.springframework.http.HttpHeaders`
`getHeaders()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### MockHttpInputMessage

public MockHttpInputMessage(byte[] body)
Create a `MockHttpInputMessage` with the supplied body.

### MockHttpInputMessage

public MockHttpInputMessage(InputStream body)
Create a `MockHttpInputMessage` with the supplied body.

## Method Details

### getHeaders

public org.springframework.http.HttpHeaders getHeaders()

Specified by:
  `getHeaders` in interface `org.springframework.http.HttpMessage`

### getBody

public InputStream getBody() throws IOException

Specified by:
  `getBody` in interface `org.springframework.http.HttpInputMessage`
Throws:
  `IOException`