Class ByteBufferEntity

  • All Implemented Interfaces:
    java.lang.Cloneable, org.apache.http.HttpEntity

    @Contract(threading=UNSAFE)
    public class ByteBufferEntity
    extends org.apache.http.entity.AbstractHttpEntity
    implements java.lang.Cloneable
    An entity that delivers the contents of a ByteBuffer.
    • Field Summary

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

        chunked, contentEncoding, contentType, OUTPUT_BUFFER_SIZE
    • Constructor Summary

      Constructors 
      Constructor Description
      ByteBufferEntity​(java.nio.ByteBuffer buffer)  
      ByteBufferEntity​(java.nio.ByteBuffer buffer, org.apache.http.entity.ContentType contentType)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object clone()  
      java.io.InputStream getContent()  
      long getContentLength()  
      boolean isRepeatable()  
      boolean isStreaming()  
      void writeTo​(java.io.OutputStream outstream)  
      • 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

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

      • ByteBufferEntity

        public ByteBufferEntity​(java.nio.ByteBuffer buffer,
                                org.apache.http.entity.ContentType contentType)
      • ByteBufferEntity

        public ByteBufferEntity​(java.nio.ByteBuffer buffer)
    • Method Detail

      • isRepeatable

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

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

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

        public void writeTo​(java.io.OutputStream outstream)
                     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
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Overrides:
        clone in class java.lang.Object
        Throws:
        java.lang.CloneNotSupportedException