public class StreamingRequestBody extends okhttp3.RequestBody implements ProgressBody, QCloudDigistListener
| 限定符和类型 | 字段和说明 |
|---|---|
protected byte[] |
bytes |
protected long |
contentRawLength |
protected android.content.ContentResolver |
contentResolver |
protected java.lang.String |
contentType |
protected com.tencent.qcloud.core.http.CountingSink |
countingSink |
protected java.io.File |
file |
protected long |
offset |
protected QCloudProgressListener |
progressListener |
protected long |
requiredLength |
protected java.io.InputStream |
stream |
protected android.net.Uri |
uri |
protected java.net.URL |
url |
| 限定符 | 构造器和说明 |
|---|---|
protected |
StreamingRequestBody() |
| 限定符和类型 | 方法和说明 |
|---|---|
long |
contentLength()
Returns the number of bytes that will be written to
sink in a call to RequestBody.writeTo(okio.BufferedSink),
or -1 if that count is unknown. |
okhttp3.MediaType |
contentType()
Returns the Content-Type header for this body.
|
long |
getBytesTransferred() |
protected long |
getContentRawLength() |
QCloudProgressListener |
getProgressListener() |
java.io.InputStream |
getStream() |
java.lang.String |
onGetMd5() |
void |
release() |
protected void |
saveInputStreamToTmpFile(java.io.InputStream stream,
java.io.File file) |
void |
setProgressListener(QCloudProgressListener progressListener) |
void |
writeTo(okio.BufferedSink sink)
Writes the content of this request to
sink. |
protected java.io.File file
protected byte[] bytes
protected java.io.InputStream stream
protected java.net.URL url
protected android.net.Uri uri
protected android.content.ContentResolver contentResolver
protected long offset
protected long requiredLength
protected long contentRawLength
protected java.lang.String contentType
protected QCloudProgressListener progressListener
protected com.tencent.qcloud.core.http.CountingSink countingSink
public void setProgressListener(QCloudProgressListener progressListener)
setProgressListener 在接口中 ProgressBodypublic QCloudProgressListener getProgressListener()
public long getBytesTransferred()
getBytesTransferred 在接口中 ProgressBodypublic okhttp3.MediaType contentType()
okhttp3.RequestBodycontentType 在类中 okhttp3.RequestBodypublic long contentLength()
throws java.io.IOException
okhttp3.RequestBodysink in a call to RequestBody.writeTo(okio.BufferedSink),
or -1 if that count is unknown.contentLength 在类中 okhttp3.RequestBodyjava.io.IOExceptionprotected long getContentRawLength()
throws java.io.IOException
java.io.IOExceptionpublic java.io.InputStream getStream()
throws java.io.IOException
java.io.IOExceptionprotected void saveInputStreamToTmpFile(java.io.InputStream stream,
java.io.File file)
throws java.io.IOException
java.io.IOExceptionpublic void writeTo(okio.BufferedSink sink)
throws java.io.IOException
okhttp3.RequestBodysink.writeTo 在类中 okhttp3.RequestBodyjava.io.IOExceptionpublic java.lang.String onGetMd5()
throws java.io.IOException
onGetMd5 在接口中 QCloudDigistListenerjava.io.IOExceptionpublic void release()