public class ProgressRequestBody
extends okhttp3.RequestBody
RequestBody, 通过此类获取 Okhttp 上传的二进制数据
Created by JessYan on 02/06/2017 18:05 Contact me Follow me ================================================
| Modifier and Type | Class and Description |
|---|---|
protected class |
ProgressRequestBody.CountingSink |
| Modifier and Type | Field and Description |
|---|---|
protected okhttp3.RequestBody |
mDelegate |
protected android.os.Handler |
mHandler |
protected ProgressListener[] |
mListeners |
protected ProgressInfo |
mProgressInfo |
protected int |
mRefreshTime |
| Constructor and Description |
|---|
ProgressRequestBody(android.os.Handler handler,
okhttp3.RequestBody delegate,
List<ProgressListener> listeners,
int refreshTime) |
| Modifier and Type | Method and Description |
|---|---|
long |
contentLength() |
okhttp3.MediaType |
contentType() |
void |
writeTo(okio.BufferedSink sink) |
protected android.os.Handler mHandler
protected int mRefreshTime
protected final okhttp3.RequestBody mDelegate
protected final ProgressListener[] mListeners
protected final ProgressInfo mProgressInfo
public ProgressRequestBody(android.os.Handler handler,
okhttp3.RequestBody delegate,
List<ProgressListener> listeners,
int refreshTime)
public okhttp3.MediaType contentType()
contentType in class okhttp3.RequestBodypublic long contentLength()
contentLength in class okhttp3.RequestBodypublic void writeTo(okio.BufferedSink sink)
throws IOException
writeTo in class okhttp3.RequestBodyIOException