Package com.squareup.okhttp
Class Response.Body
java.lang.Object
com.squareup.okhttp.Response.Body
- Enclosing class:
- Response
public abstract static class Response.Body extends Object
-
Constructor Summary
Constructors Constructor Description Body() -
Method Summary
Modifier and Type Method Description byte[]bytes()abstract InputStreambyteStream()ReadercharStream()Returns the response bytes as a UTF-8 character stream.longcontentLength()StringcontentType()Stringstring()Returns the response bytes as a UTF-8 string.
-
Constructor Details
-
Body
public Body()
-
-
Method Details
-
contentType
-
contentLength
public long contentLength() -
byteStream
- Throws:
IOException
-
bytes
- Throws:
IOException
-
charStream
Returns the response bytes as a UTF-8 character stream. Do not call this method if the response content is not a UTF-8 character stream.- Throws:
IOException
-
string
Returns the response bytes as a UTF-8 string. Do not call this method if the response content is not a UTF-8 character stream.- Throws:
IOException
-