Class ApacheHttpClient5Transport.ContentHttpEntity

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, org.apache.hc.core5.http.EntityDetails, org.apache.hc.core5.http.HttpEntity
    Enclosing class:
    ApacheHttpClient5Transport

    public static class ApacheHttpClient5Transport.ContentHttpEntity
    extends org.apache.hc.core5.http.io.entity.HttpEntityWrapper
    An entity that lets the caller specify the return value of isChunked().
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isChunked()
      A chunked entity requires transfer-encoding:chunked in http headers which requires isChunked to be true
      • Methods inherited from class org.apache.hc.core5.http.io.entity.HttpEntityWrapper

        close, getContent, getContentEncoding, getContentLength, getContentType, getTrailerNames, getTrailers, isRepeatable, isStreaming, toString, writeTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ContentHttpEntity

        public ContentHttpEntity​(org.apache.hc.core5.http.HttpEntity entity)
        Creates a ApacheHttpClient5Transport.ContentHttpEntity instance with the provided HTTP entity.
        Parameters:
        entity - the HTTP entity.
      • ContentHttpEntity

        public ContentHttpEntity​(org.apache.hc.core5.http.HttpEntity entity,
                                 boolean chunkedEnabled)
        Creates a ApacheHttpClient5Transport.ContentHttpEntity instance with the provided HTTP entity.
        Parameters:
        entity - the HTTP entity.
        chunkedEnabled - force enable/disable chunked transfer-encoding.
    • Method Detail

      • isChunked

        public boolean isChunked()
        A chunked entity requires transfer-encoding:chunked in http headers which requires isChunked to be true
        Specified by:
        isChunked in interface org.apache.hc.core5.http.EntityDetails
        Overrides:
        isChunked in class org.apache.hc.core5.http.io.entity.HttpEntityWrapper
        Returns:
        true