public class OKHttpUtils.ProgressRequestBody
extends okhttp3.RequestBody
| 构造器和说明 |
|---|
ProgressRequestBody(okhttp3.RequestBody requestBody,
OKHttpListener progressListener)
构造函数,赋值
|
| 限定符和类型 | 方法和说明 |
|---|---|
long |
contentLength()
重写调用实际的响应体的contentLength
|
okhttp3.MediaType |
contentType()
重写调用实际的响应体的contentType
|
void |
writeTo(okio.BufferedSink sink)
重写进行写入
|
public ProgressRequestBody(okhttp3.RequestBody requestBody,
OKHttpListener progressListener)
requestBody - 待包装的请求体progressListener - 回调接口public okhttp3.MediaType contentType()
contentType 在类中 okhttp3.RequestBodypublic long contentLength()
throws IOException
contentLength 在类中 okhttp3.RequestBodyIOException - 异常public void writeTo(okio.BufferedSink sink)
throws IOException
writeTo 在类中 okhttp3.RequestBodysink - BufferedSinkIOException - 异常