public final class BufferedBody extends OutputStreamBody
| Constructor and Description |
|---|
BufferedBody(long expectedContentLength) |
| Modifier and Type | Method and Description |
|---|---|
long |
contentLength()
返回调用
RequestBody.writeTo(org.aoju.bus.core.io.BufferSink)时写入sink的字节数,如果该计数未知,则返回-1 |
Request |
prepareToSendRequest(Request request)
现在我们已经缓冲了整个请求体,更新请求头和请求体本身。
这是为了使HttpURLConnection用户能够在发送请求体字节之前完成套接字连接
|
void |
writeTo(BufferSink sink)
将此请求的内容写入
sink |
contentType, initOutputStream, isClosed, outputStream, timeoutpublic long contentLength()
RequestBodyRequestBody.writeTo(org.aoju.bus.core.io.BufferSink)时写入sink的字节数,如果该计数未知,则返回-1contentLength in class OutputStreamBodypublic Request prepareToSendRequest(Request request) throws IOException
prepareToSendRequest in class OutputStreamBodyrequest - 网络请求IOException - 异常public void writeTo(BufferSink sink)
RequestBodysinkwriteTo in class RequestBodysink - 缓存区Copyright © 2020. All rights reserved.