public abstract class SniffingResponseBody
extends okhttp3.ResponseBody
Source.
Created by covers1624 on 15/2/21.
| Constructor and Description |
|---|
SniffingResponseBody(okhttp3.ResponseBody parent) |
| Modifier and Type | Method and Description |
|---|---|
long |
contentLength() |
okhttp3.MediaType |
contentType() |
static okhttp3.ResponseBody |
ofFunction(okhttp3.ResponseBody body,
java.util.function.Function<okio.Source,okio.Source> func)
Creates a new
SniffingResponseBody from the given body, with the Source
wrapped using the given Function. |
@NotNull okio.BufferedSource |
source() |
protected abstract okio.Source |
wrapSource(okio.Source other)
Wrap the given
Source into another Source. |
public static okhttp3.ResponseBody ofFunction(okhttp3.ResponseBody body,
java.util.function.Function<okio.Source,okio.Source> func)
SniffingResponseBody from the given body, with the Source
wrapped using the given Function.body - The body to wrap.func - The Function to wrap the Source.ResponseBody.public long contentLength()
contentLength in class okhttp3.ResponseBodypublic okhttp3.MediaType contentType()
contentType in class okhttp3.ResponseBody@NotNull public @NotNull okio.BufferedSource source()
source in class okhttp3.ResponseBodyprotected abstract okio.Source wrapSource(okio.Source other)
Source into another Source.
This is usually performed with something such as ForwardingSourceother - The Source to wrap.