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
在接口中 ProgressBody
public QCloudProgressListener getProgressListener()
public long getBytesTransferred()
getBytesTransferred
在接口中 ProgressBody
public okhttp3.MediaType contentType()
okhttp3.RequestBody
contentType
在类中 okhttp3.RequestBody
public long contentLength() throws java.io.IOException
okhttp3.RequestBody
sink
in a call to RequestBody.writeTo(okio.BufferedSink)
,
or -1 if that count is unknown.contentLength
在类中 okhttp3.RequestBody
java.io.IOException
protected long getContentRawLength() throws java.io.IOException
java.io.IOException
public java.io.InputStream getStream() throws java.io.IOException
java.io.IOException
protected void saveInputStreamToTmpFile(java.io.InputStream stream, java.io.File file) throws java.io.IOException
java.io.IOException
public void writeTo(okio.BufferedSink sink) throws java.io.IOException
okhttp3.RequestBody
sink
.writeTo
在类中 okhttp3.RequestBody
java.io.IOException
public java.lang.String onGetMd5() throws java.io.IOException
onGetMd5
在接口中 QCloudDigistListener
java.io.IOException
public void release()