public interface ResponseBody
| Modifier and Type | Method and Description |
|---|---|
long |
contentLength()
Get the content-length of the message body, if the length is unknown, return a negative value.
|
MediaType |
contentType()
Get the content-type of the message body, including charset.
|
boolean |
isChunked()
Tells about chunked encoding for this entity.
|
boolean |
isRepeatable()
Can it be reused?
|
void |
writeTo(java.io.OutputStream output)
Write the body to the output stream.
|
boolean isRepeatable()
boolean isChunked()
The behavior of wrapping entities is implementation dependent, but should respect the primary purpose.
true if chunked encoding is preferred for this entity, or false if it is notlong contentLength()
MediaType contentType()
application/json; charset=utf-8.void writeTo(java.io.OutputStream output)
throws java.io.IOException
output - the output stream to write the body.java.io.IOException