Class InputStreamEntity

java.lang.Object
org.apache.hc.core5.http.io.entity.AbstractHttpEntity
net.anwiba.commons.http.apache.InputStreamEntity
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hc.core5.http.EntityDetails, org.apache.hc.core5.http.HttpEntity

public class InputStreamEntity extends org.apache.hc.core5.http.io.entity.AbstractHttpEntity
  • Constructor Details

  • Method Details

    • isRepeatable

      public boolean isRepeatable()
      Specified by:
      isRepeatable in interface org.apache.hc.core5.http.HttpEntity
      Overrides:
      isRepeatable in class org.apache.hc.core5.http.io.entity.AbstractHttpEntity
    • getContentLength

      public long getContentLength()
      Returns:
      the content length or -1 if unknown
    • getContent

      public InputStream getContent() throws IOException
      Throws:
      IOException
    • writeTo

      public void writeTo(OutputStream outstream) throws IOException
      Specified by:
      writeTo in interface org.apache.hc.core5.http.HttpEntity
      Overrides:
      writeTo in class org.apache.hc.core5.http.io.entity.AbstractHttpEntity
      Throws:
      IOException
    • isStreaming

      public boolean isStreaming()
    • close

      public void close() throws IOException
      Throws:
      IOException