the actual body content (also known as response entity)
the content type received from the webserver, if any, or else some suitable default
(Since version since v0.21.6) Use the simpler constructor
Converts the body of the response into an array of bytes.
Converts the body of the response into an array of bytes. This uses the character encoding of the contentType, or UTF-8 as a default.
Get the body of the response as a string.
Get the body of the response as a string.
the actual body content (also known as response entity)
Closes the input stream that provides the data for this response.
Closes the input stream that provides the data for this response. If the implementation buffers the body, the input stream will have been closed automatically.
the content type received from the webserver, if any, or else some suitable default
the content type received from the webserver, if any, or else some suitable default
Gets the content as an input stream.
Gets the content as an input stream. Each time this is called, a new ByteArrayInputStream is returned. This should be closed by the calling code when it has been finished with.
Tests whether the implementation has buffered the whole response body.
Tests whether the implementation has buffered the whole response body. If this returns false, toBufferedBody
provides an easy route to accumulate the entire body in a buffer.
Tests whether this response body can be represented as text, or whether the data is binary.
Tests whether this response body can be represented as text, or whether the data is binary.
Always false.
Always false.
Gets the body as a string split into lines, if available.
Gets the body as a string split into lines, if available. This is only possible for textual content. An IllegalStateException is thrown if the data is binary.
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
Gets the body content in byte array form.
Gets the body content in byte array form.
Gets the response body as a string for diagnostic purposes.
Gets the response body as a string for diagnostic purposes.
Returns this
.
Returns this
.
(Changed in version 2.9.0) transpose
throws an IllegalArgumentException
if collections are not uniformly sized.
Provides a body implementation based simply on a string.
This is immutable and therefore can be safely shared between threads.
the actual body content (also known as response entity)
the content type received from the webserver, if any, or else some suitable default