Class ZeroCopyPost
- java.lang.Object
-
- org.apache.http.nio.client.methods.BaseZeroCopyRequestProducer
-
- org.apache.http.nio.client.methods.ZeroCopyPost
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,org.apache.http.nio.protocol.HttpAsyncRequestProducer
public class ZeroCopyPost extends BaseZeroCopyRequestProducer
HttpAsyncRequestProducer
implementation that generates an HTTPPOST
request enclosing content of a file. The request content will be streamed out directly from the underlying file without an intermediate in-memory buffer.- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description ZeroCopyPost(java.lang.String requestURI, java.io.File content, org.apache.http.entity.ContentType contentType)
ZeroCopyPost(java.net.URI requestURI, java.io.File content, org.apache.http.entity.ContentType contentType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.http.HttpEntityEnclosingRequest
createRequest(java.net.URI requestURI, org.apache.http.HttpEntity entity)
-
Methods inherited from class org.apache.http.nio.client.methods.BaseZeroCopyRequestProducer
close, failed, generateRequest, getTarget, isRepeatable, produceContent, requestCompleted, resetRequest
-
-
-
-
Constructor Detail
-
ZeroCopyPost
public ZeroCopyPost(java.net.URI requestURI, java.io.File content, org.apache.http.entity.ContentType contentType) throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
-
ZeroCopyPost
public ZeroCopyPost(java.lang.String requestURI, java.io.File content, org.apache.http.entity.ContentType contentType) throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
-
-
Method Detail
-
createRequest
protected org.apache.http.HttpEntityEnclosingRequest createRequest(java.net.URI requestURI, org.apache.http.HttpEntity entity)
- Specified by:
createRequest
in classBaseZeroCopyRequestProducer
-
-