ClientHttpResponse that can not only check if
the response has a message body, but also if its length is 0 (i.e. empty)
by actually reading the input stream.
| Modifier and Type | Field and Description |
|---|---|
| private PushbackInputStream |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public InputStream | getBody()
Overrides org. Implements org. |
| public boolean | Returns: true if the response has a zero-length message body, false otherwiseIndicates whether the response has an empty message body. |
| public boolean | Returns: true if the response has a message body, false otherwiseIndicates whether the response has a message body. |
| pushbackInputStream | back to summary |
|---|---|
| private PushbackInputStream pushbackInputStream
| |
| IntrospectingClientHttpResponse | back to summary |
|---|---|
| public IntrospectingClientHttpResponse(ClientHttpResponse response) | |
| getBody | back to summary |
|---|---|
| public InputStream getBody() throws IOException Overrides org. Implements org. Doc from org. Return the body of the message as an input stream.
| |
| hasEmptyMessageBody | back to summary |
|---|---|
| public boolean hasEmptyMessageBody() throws IOException Indicates whether the response has an empty message body. Implementation tries to read the first bytes of the response stream:
| |
| hasMessageBody | back to summary |
|---|---|
| public boolean hasMessageBody() throws IOException Indicates whether the response has a message body. Implementation returns
| |