Class ZeroCopyPut

  • All Implemented Interfaces:
    Closeable, AutoCloseable, 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
    • Method Detail

      • 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:
        generateRequest in interface org.apache.http.nio.protocol.HttpAsyncRequestProducer
        Throws:
        IOException
        org.apache.http.HttpException
      • getTarget

        public org.apache.http.HttpHost getTarget()
        Specified by:
        getTarget in interface org.apache.http.nio.protocol.HttpAsyncRequestProducer
      • produceContent

        public void produceContent​(org.apache.http.nio.ContentEncoder encoder,
                                   org.apache.http.nio.IOControl ioctrl)
                            throws IOException
        Specified by:
        produceContent in interface org.apache.http.nio.protocol.HttpAsyncRequestProducer
        Throws:
        IOException
      • requestCompleted

        public void requestCompleted​(org.apache.http.protocol.HttpContext context)
        Specified by:
        requestCompleted in interface org.apache.http.nio.protocol.HttpAsyncRequestProducer
      • failed

        public void failed​(Exception ex)
        Specified by:
        failed in interface org.apache.http.nio.protocol.HttpAsyncRequestProducer
      • isRepeatable

        public boolean isRepeatable()
        Specified by:
        isRepeatable in interface org.apache.http.nio.protocol.HttpAsyncRequestProducer
      • resetRequest

        public void resetRequest()
                          throws IOException
        Specified by:
        resetRequest in interface org.apache.http.nio.protocol.HttpAsyncRequestProducer
        Throws:
        IOException