org.apache.http.nio.client.methods
Class ZeroCopyPut
java.lang.Object
   org.apache.http.nio.client.methods.ZeroCopyPut
org.apache.http.nio.client.methods.ZeroCopyPut
- All Implemented Interfaces: 
- Closeable, org.apache.http.nio.protocol.HttpAsyncRequestProducer
- public class ZeroCopyPut 
- extends Object
HttpAsyncRequestProducer implementation
 that generates an HTTP PUT 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 | 
| ZeroCopyPut(String requestURI,
            File content,
            org.apache.http.entity.ContentType contentType)
 | 
| ZeroCopyPut(URI requestURI,
            File content,
            org.apache.http.entity.ContentType contentType)
 | 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
ZeroCopyPut
public ZeroCopyPut(URI requestURI,
                   File content,
                   org.apache.http.entity.ContentType contentType)
            throws FileNotFoundException
- Throws:
- FileNotFoundException
ZeroCopyPut
public ZeroCopyPut(String requestURI,
                   File content,
                   org.apache.http.entity.ContentType contentType)
            throws FileNotFoundException
- Throws:
- FileNotFoundException
createRequest
protected org.apache.http.HttpEntityEnclosingRequest createRequest(URI requestURI,
                                                                   org.apache.http.HttpEntity entity)
- 
 
- 
 
generateRequest
public org.apache.http.HttpRequest generateRequest()
                                            throws IOException,
                                                   org.apache.http.HttpException
- 
- Specified by:
- generateRequestin interface- org.apache.http.nio.protocol.HttpAsyncRequestProducer
 
- 
- Throws:
- IOException
- org.apache.http.HttpException
 
getTarget
public org.apache.http.HttpHost getTarget()
- 
- Specified by:
- getTargetin interface- org.apache.http.nio.protocol.HttpAsyncRequestProducer
 
- 
 
produceContent
public void produceContent(org.apache.http.nio.ContentEncoder encoder,
                           org.apache.http.nio.IOControl ioControl)
                    throws IOException
- 
- Specified by:
- produceContentin interface- org.apache.http.nio.protocol.HttpAsyncRequestProducer
 
- 
- Throws:
- IOException
 
requestCompleted
public void requestCompleted(org.apache.http.protocol.HttpContext context)
- 
- Specified by:
- requestCompletedin interface- org.apache.http.nio.protocol.HttpAsyncRequestProducer
 
- 
 
failed
public void failed(Exception ex)
- 
- Specified by:
- failedin interface- org.apache.http.nio.protocol.HttpAsyncRequestProducer
 
- 
 
isRepeatable
public boolean isRepeatable()
- 
- Specified by:
- isRepeatablein interface- org.apache.http.nio.protocol.HttpAsyncRequestProducer
 
- 
 
resetRequest
public void resetRequest()
                  throws IOException
- 
- Specified by:
- resetRequestin interface- org.apache.http.nio.protocol.HttpAsyncRequestProducer
 
- 
- Throws:
- IOException
 
close
public void close()
           throws IOException
- 
- Specified by:
- closein interface- Closeable
 
- 
- Throws:
- IOException
 
Copyright © 2010–2021 The Apache Software Foundation. All rights reserved.