public class SimpleHttpEntity extends Object implements HttpEntity
The bytes are supplied to the constructor, as the body of the entity.
This is a sharable entity.
| Constructor and Description |
|---|
SimpleHttpEntity(ContentType contentType,
Stream<ByteBuffer> bytes)
Create an HttpEntity with `bytes` as the body.
|
SimpleHttpEntity(ContentType contentType,
ByteBuffer bytes)
Create an HttpEntity with `bytes` as the body.
|
SimpleHttpEntity(ContentType contentType,
byte[] bytes)
Create an HttpEntity with `bytes` as the body.
|
| Instance Methods | |
|---|---|
ByteSource |
body()
The body of this entity.
|
ContentType |
contentType()
The content type.
|
Long |
contentLength()
The length of the body.
|
Instant |
lastModified()
When this entity was last modified.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbodyBytes, bodyString, contentEncoding, etag, etagIsWeak, expirespublic SimpleHttpEntity(ContentType contentType, Stream<ByteBuffer> bytes)
public SimpleHttpEntity(ContentType contentType, ByteBuffer bytes)
public SimpleHttpEntity(ContentType contentType, byte[] bytes)
public ByteSource body()
body in interface HttpEntitypublic ContentType contentType()
contentType in interface HttpEntitypublic Long contentLength()
contentLength in interface HttpEntitypublic Instant lastModified()
This implementation returns the time this object was instantiated.
lastModified in interface HttpEntity