public final class RealResponseBody extends ResponseBody
Modifier and Type | Field and Description |
---|---|
private long |
contentLength |
private java.lang.String |
contentTypeString
Use a string to avoid parsing the content type until needed.
|
private okio.BufferedSource |
source |
Constructor and Description |
---|
RealResponseBody(java.lang.String contentTypeString,
long contentLength,
okio.BufferedSource source) |
Modifier and Type | Method and Description |
---|---|
long |
contentLength()
Returns the number of bytes in that will returned by
ResponseBody.bytes() , or ResponseBody.byteStream() , or
-1 if unknown. |
MediaType |
contentType() |
okio.BufferedSource |
source() |
bytes, byteStream, charStream, close, create, create, create, string
@Nullable private final java.lang.String contentTypeString
private final long contentLength
private final okio.BufferedSource source
public RealResponseBody(@Nullable java.lang.String contentTypeString, long contentLength, okio.BufferedSource source)
public MediaType contentType()
contentType
in class ResponseBody
public long contentLength()
ResponseBody
ResponseBody.bytes()
, or ResponseBody.byteStream()
, or
-1 if unknown.contentLength
in class ResponseBody
public okio.BufferedSource source()
source
in class ResponseBody