Class ZeroCopyPut

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, org.apache.http.nio.protocol.HttpAsyncRequestProducer

    public class ZeroCopyPut
    extends BaseZeroCopyRequestProducer
    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 Detail

      • ZeroCopyPut

        public ZeroCopyPut​(java.net.URI requestURI,
                           java.io.File content,
                           org.apache.http.entity.ContentType contentType)
                    throws java.io.FileNotFoundException
        Throws:
        java.io.FileNotFoundException
      • ZeroCopyPut

        public ZeroCopyPut​(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 class BaseZeroCopyRequestProducer