public class MultipartStreamRequestBody extends okhttp3.RequestBody implements ProgressBody, QCloudDigistListener, ReactiveBody
构造器和说明 |
---|
MultipartStreamRequestBody() |
限定符和类型 | 方法和说明 |
---|---|
void |
addMd5() |
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.
|
<T> void |
end(HttpResult<T> httpResult)
结束请求体
|
long |
getBytesTransferred() |
java.lang.String |
onGetMd5() |
void |
prepare()
准备请求体
|
void |
setBodyParameters(java.util.Map<java.lang.String,java.lang.String> bodyParameters) |
void |
setContent(java.lang.String contentType,
java.lang.String name,
java.lang.String fileName,
byte[] bytes,
long offset,
long counts) |
void |
setContent(java.lang.String contentType,
java.lang.String name,
java.lang.String fileName,
java.io.File tmpFile,
java.io.InputStream stream,
long offset,
long counts) |
void |
setContent(java.lang.String contentType,
java.lang.String name,
java.lang.String fileName,
java.io.File file,
long offset,
long counts) |
void |
setProgressListener(QCloudProgressListener progressListener) |
void |
setSign(java.lang.String sign) |
void |
writeTo(okio.BufferedSink sink)
Writes the content of this request to
sink . |
public void setBodyParameters(java.util.Map<java.lang.String,java.lang.String> bodyParameters)
public void setContent(java.lang.String contentType, java.lang.String name, java.lang.String fileName, java.io.File file, long offset, long counts)
public void setContent(java.lang.String contentType, java.lang.String name, java.lang.String fileName, byte[] bytes, long offset, long counts)
public void setContent(java.lang.String contentType, java.lang.String name, java.lang.String fileName, java.io.File tmpFile, java.io.InputStream stream, long offset, long counts) throws java.io.IOException
java.io.IOException
public void setSign(java.lang.String sign)
public void addMd5() throws java.io.IOException
java.io.IOException
public void prepare()
ReactiveBody
prepare
在接口中 ReactiveBody
public <T> void end(HttpResult<T> httpResult) throws java.io.IOException
ReactiveBody
end
在接口中 ReactiveBody
java.io.IOException
public void setProgressListener(QCloudProgressListener progressListener)
setProgressListener
在接口中 ProgressBody
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
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