public static final class HttpEntity.Streamed extends HttpEntity
HttpEntity.Chunked, HttpEntity.Streamed, HttpEntity.StrictNO_ENTITY| Constructor and Description |
|---|
Streamed(akka.stream.javadsl.Source<akka.util.ByteString,?> data,
java.util.Optional<java.lang.Long> contentLength,
java.util.Optional<java.lang.String> contentType) |
| Modifier and Type | Method and Description |
|---|---|
HttpEntity |
as(java.lang.String contentType)
Return the entity as the given content type.
|
play.api.http.HttpEntity |
asScala() |
java.util.Optional<java.lang.Long> |
contentLength()
The content length, if known
|
java.util.Optional<java.lang.String> |
contentType()
The content type, if defined
|
akka.stream.javadsl.Source<akka.util.ByteString,?> |
data() |
akka.stream.javadsl.Source<akka.util.ByteString,?> |
dataStream()
The stream of data.
|
boolean |
isKnownEmpty()
Whether the entity is known to be empty or not.
|
chunked, consumeData, fromContent, fromStringpublic Streamed(akka.stream.javadsl.Source<akka.util.ByteString,?> data,
java.util.Optional<java.lang.Long> contentLength,
java.util.Optional<java.lang.String> contentType)
public akka.stream.javadsl.Source<akka.util.ByteString,?> data()
public java.util.Optional<java.lang.String> contentType()
HttpEntitycontentType in class HttpEntitypublic boolean isKnownEmpty()
HttpEntityisKnownEmpty in class HttpEntitypublic java.util.Optional<java.lang.Long> contentLength()
HttpEntitycontentLength in class HttpEntitypublic HttpEntity as(java.lang.String contentType)
HttpEntityas in class HttpEntitypublic akka.stream.javadsl.Source<akka.util.ByteString,?> dataStream()
HttpEntitydataStream in class HttpEntitypublic play.api.http.HttpEntity asScala()
asScala in class HttpEntity