public class ZeroCopyPost extends BaseZeroCopyRequestProducer
HttpAsyncRequestProducer implementation
that generates an HTTP POST request enclosing content of a file.
The request content will be streamed out directly from the underlying file
without an intermediate in-memory buffer.| Constructor and 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) |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.http.HttpEntityEnclosingRequest |
createRequest(java.net.URI requestURI,
org.apache.http.HttpEntity entity) |
close, failed, generateRequest, getTarget, isRepeatable, produceContent, requestCompleted, resetRequestpublic ZeroCopyPost(java.net.URI requestURI,
java.io.File content,
org.apache.http.entity.ContentType contentType)
throws java.io.FileNotFoundException
java.io.FileNotFoundExceptionpublic ZeroCopyPost(java.lang.String requestURI,
java.io.File content,
org.apache.http.entity.ContentType contentType)
throws java.io.FileNotFoundException
java.io.FileNotFoundExceptionprotected org.apache.http.HttpEntityEnclosingRequest createRequest(java.net.URI requestURI,
org.apache.http.HttpEntity entity)
createRequest in class BaseZeroCopyRequestProducer