Class ByteBufferEntity
- java.lang.Object
-
- org.apache.http.entity.AbstractHttpEntity
-
- pl.allegro.tech.hermes.consumers.consumer.sender.http.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.CloneableAn entity that delivers the contents of aByteBuffer.
-
-
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.Objectclone()java.io.InputStreamgetContent()longgetContentLength()booleanisRepeatable()booleanisStreaming()voidwriteTo(java.io.OutputStream outstream)
-
-
-
Method Detail
-
isRepeatable
public boolean isRepeatable()
- Specified by:
isRepeatablein interfaceorg.apache.http.HttpEntity
-
getContentLength
public long getContentLength()
- Specified by:
getContentLengthin interfaceorg.apache.http.HttpEntity
-
getContent
public java.io.InputStream getContent() throws java.io.IOException, java.lang.UnsupportedOperationException- Specified by:
getContentin interfaceorg.apache.http.HttpEntity- Throws:
java.io.IOExceptionjava.lang.UnsupportedOperationException
-
writeTo
public void writeTo(java.io.OutputStream outstream) throws java.io.IOException- Specified by:
writeToin interfaceorg.apache.http.HttpEntity- Throws:
java.io.IOException
-
isStreaming
public boolean isStreaming()
- Specified by:
isStreamingin interfaceorg.apache.http.HttpEntity
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException- Overrides:
clonein classjava.lang.Object- Throws:
java.lang.CloneNotSupportedException
-
-