Example usage for Java com.squareup.okhttp ResponseBody fields, constructors, methods, implement or subclass
The text is from its open source code.
byte[] | bytes() |
InputStream | byteStream() |
Reader | charStream() Returns the response as a character stream decoded with the charset of the Content-Type header. |
void | close() |
long | contentLength() Returns the number of bytes in that will returned by #bytes , or #byteStream , or -1 if unknown. |
MediaType | contentType() |
ResponseBody | create(MediaType contentType, String content) Returns a new response body that transmits content . |
ResponseBody | create(final MediaType contentType, byte[] content) Returns a new response body that transmits content . |
ResponseBody | create(final MediaType contentType, final long contentLength, final BufferedSource content) Returns a new response body that transmits content . |
BufferedSource | source() |
String | string() Returns the response as a string decoded with the charset of the Content-Type header. |