public class MockClientHttpResponse extends MockHttpInputMessage implements ClientHttpResponse
ClientHttpResponse.| Constructor and Description | 
|---|
MockClientHttpResponse(byte[] body,
                      HttpStatus statusCode)
Constructor with response body as a byte array. 
 | 
MockClientHttpResponse(InputStream body,
                      HttpStatus statusCode)
Constructor with response body as InputStream. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
close()
Closes this response, freeing any resources created. 
 | 
int | 
getRawStatusCode()
Return the HTTP status code of the response as integer 
 | 
HttpStatus | 
getStatusCode()
Return the HTTP status code of the response. 
 | 
String | 
getStatusText()
Return the HTTP status text of the response. 
 | 
getBody, getHeadersclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBodygetHeaderspublic MockClientHttpResponse(byte[] body,
                              HttpStatus statusCode)
public MockClientHttpResponse(InputStream body, HttpStatus statusCode)
public HttpStatus getStatusCode() throws IOException
ClientHttpResponsegetStatusCode in interface ClientHttpResponseIOException - in case of I/O errorspublic int getRawStatusCode()
                     throws IOException
ClientHttpResponsegetRawStatusCode in interface ClientHttpResponseIOException - in case of I/O errorspublic String getStatusText() throws IOException
ClientHttpResponsegetStatusText in interface ClientHttpResponseIOException - in case of I/O errorspublic void close()
ClientHttpResponseclose in interface Closeableclose in interface AutoCloseableclose in interface ClientHttpResponse