Class RequestEntityProxy

java.lang.Object
org.apache.hc.client5.http.impl.classic.RequestEntityProxy
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hc.core5.http.EntityDetails, org.apache.hc.core5.http.HttpEntity

class RequestEntityProxy extends Object implements org.apache.hc.core5.http.HttpEntity
  • Field Details

    • original

      private final org.apache.hc.core5.http.HttpEntity original
    • consumed

      private boolean consumed
  • Constructor Details

    • RequestEntityProxy

      RequestEntityProxy(org.apache.hc.core5.http.HttpEntity original)
  • Method Details

    • enhance

      static void enhance(org.apache.hc.core5.http.ClassicHttpRequest request)
    • isEnhanced

      static boolean isEnhanced(org.apache.hc.core5.http.HttpEntity entity)
    • getOriginal

      public org.apache.hc.core5.http.HttpEntity getOriginal()
    • isConsumed

      public boolean isConsumed()
    • isRepeatable

      public boolean isRepeatable()
      Specified by:
      isRepeatable in interface org.apache.hc.core5.http.HttpEntity
    • isChunked

      public boolean isChunked()
      Specified by:
      isChunked in interface org.apache.hc.core5.http.EntityDetails
    • getContentLength

      public long getContentLength()
      Specified by:
      getContentLength in interface org.apache.hc.core5.http.EntityDetails
    • getContentType

      public String getContentType()
      Specified by:
      getContentType in interface org.apache.hc.core5.http.EntityDetails
    • getContentEncoding

      public String getContentEncoding()
      Specified by:
      getContentEncoding in interface org.apache.hc.core5.http.EntityDetails
    • getContent

      public InputStream getContent() throws IOException, IllegalStateException
      Specified by:
      getContent in interface org.apache.hc.core5.http.HttpEntity
      Throws:
      IOException
      IllegalStateException
    • writeTo

      public void writeTo(OutputStream outStream) throws IOException
      Specified by:
      writeTo in interface org.apache.hc.core5.http.HttpEntity
      Throws:
      IOException
    • isStreaming

      public boolean isStreaming()
      Specified by:
      isStreaming in interface org.apache.hc.core5.http.HttpEntity
    • getTrailers

      public org.apache.hc.core5.function.Supplier<List<? extends org.apache.hc.core5.http.Header>> getTrailers()
      Specified by:
      getTrailers in interface org.apache.hc.core5.http.HttpEntity
    • getTrailerNames

      public Set<String> getTrailerNames()
      Specified by:
      getTrailerNames in interface org.apache.hc.core5.http.EntityDetails
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • toString

      public String toString()
      Overrides:
      toString in class Object