Class ResettableInputStreamRequestEntity

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, org.apache.http.HttpEntity

    public final class ResettableInputStreamRequestEntity
    extends org.apache.http.entity.AbstractHttpEntity
    implements java.io.Closeable
    A RequestEntity that can be restarted by calling RestartableInputStream.restart().
    • Field Summary

      • Fields inherited from class org.apache.http.entity.AbstractHttpEntity

        chunked, contentEncoding, contentType, OUTPUT_BUFFER_SIZE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      java.io.InputStream getContent()
      long getContentLength()  
      boolean isRepeatable()  
      boolean isStreaming()
      boolean isSuccessful()  
      void writeTo​(java.io.OutputStream out)
      • Methods inherited from class org.apache.http.entity.AbstractHttpEntity

        consumeContent, getContentEncoding, getContentType, isChunked, setChunked, setContentEncoding, setContentEncoding, setContentType, setContentType, toString
      • Methods inherited from class java.lang.Object

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

      • ResettableInputStreamRequestEntity

        public ResettableInputStreamRequestEntity​(InputStreamBuilder in,
                                                  java.lang.String contentType)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • isSuccessful

        public boolean isSuccessful()
      • getContentLength

        public long getContentLength()
        Specified by:
        getContentLength in interface org.apache.http.HttpEntity
      • isRepeatable

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

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • getContent

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

        public void writeTo​(java.io.OutputStream out)
                     throws java.io.IOException
        Specified by:
        writeTo in interface org.apache.http.HttpEntity
        Throws:
        java.io.IOException
      • isStreaming

        public boolean isStreaming()
        Specified by:
        isStreaming in interface org.apache.http.HttpEntity