public class HttpEntity$
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static HttpEntity$ |
MODULE$
Static reference to the singleton instance of this Scala object.
|
Constructor and Description |
---|
HttpEntity$() |
Modifier and Type | Method and Description |
---|---|
HttpEntity.Strict |
apply(byte[] bytes) |
HttpEntity.Strict |
apply(akka.util.ByteString data) |
HttpEntity.Strict |
apply(ContentType.NonBinary contentType,
java.lang.String string) |
HttpEntity.Strict |
apply(ContentType contentType,
byte[] bytes) |
HttpEntity.Strict |
apply(ContentType contentType,
akka.util.ByteString data) |
UniversalEntity |
apply(ContentType contentType,
java.io.File file,
int chunkSize)
Deprecated.
Use `fromPath` instead. Since 2.4.5.
|
UniversalEntity |
apply(ContentType contentType,
long contentLength,
akka.stream.scaladsl.Source<akka.util.ByteString,java.lang.Object> data) |
HttpEntity.Chunked |
apply(ContentType contentType,
akka.stream.scaladsl.Source<akka.util.ByteString,java.lang.Object> data) |
HttpEntity.Strict |
apply(java.lang.String string) |
<T extends HttpEntity> |
captureTermination(T entity)
INTERNAL API
|
HttpEntity.Strict |
Empty() |
HttpEntity.Strict |
empty(ContentType contentType) |
UniversalEntity |
fromPath(ContentType contentType,
java.nio.file.Path file,
int chunkSize)
Returns either the empty entity, if the given file is empty, or a
HttpEntity.Default entity
consisting of a stream of ByteString instances each containing chunkSize bytes
(except for the final ByteString, which simply contains the remaining bytes). |
<Mat> akka.stream.scaladsl.Source<akka.util.ByteString,Mat> |
limitableByteSource(akka.stream.scaladsl.Source<akka.util.ByteString,Mat> source)
Deprecated.
Not needed explicitly any more. . Since 10.1.5.
|
<Mat> akka.stream.scaladsl.Source<HttpEntity.ChunkStreamPart,Mat> |
limitableChunkSource(akka.stream.scaladsl.Source<HttpEntity.ChunkStreamPart,Mat> source)
Deprecated.
Not needed explicitly any more. . Since 10.1.5.
|
public static final HttpEntity$ MODULE$
public HttpEntity.Strict apply(java.lang.String string)
public HttpEntity.Strict apply(byte[] bytes)
public HttpEntity.Strict apply(akka.util.ByteString data)
public HttpEntity.Strict apply(ContentType.NonBinary contentType, java.lang.String string)
public HttpEntity.Strict apply(ContentType contentType, byte[] bytes)
public HttpEntity.Strict apply(ContentType contentType, akka.util.ByteString data)
public UniversalEntity apply(ContentType contentType, long contentLength, akka.stream.scaladsl.Source<akka.util.ByteString,java.lang.Object> data)
public HttpEntity.Chunked apply(ContentType contentType, akka.stream.scaladsl.Source<akka.util.ByteString,java.lang.Object> data)
public UniversalEntity apply(ContentType contentType, java.io.File file, int chunkSize)
HttpEntity.Default
entity
consisting of a stream of ByteString
instances each containing chunkSize
bytes
(except for the final ByteString, which simply contains the remaining bytes).
If the given chunkSize
is -1 the default chunk size is used.
contentType
- (undocumented)file
- (undocumented)chunkSize
- (undocumented)public UniversalEntity fromPath(ContentType contentType, java.nio.file.Path file, int chunkSize)
HttpEntity.Default
entity
consisting of a stream of ByteString
instances each containing chunkSize
bytes
(except for the final ByteString, which simply contains the remaining bytes).
If the given chunkSize
is -1 the default chunk size is used.
contentType
- (undocumented)file
- (undocumented)chunkSize
- (undocumented)public HttpEntity.Strict Empty()
public HttpEntity.Strict empty(ContentType contentType)
public <Mat> akka.stream.scaladsl.Source<akka.util.ByteString,Mat> limitableByteSource(akka.stream.scaladsl.Source<akka.util.ByteString,Mat> source)
source
- (undocumented)public <Mat> akka.stream.scaladsl.Source<HttpEntity.ChunkStreamPart,Mat> limitableChunkSource(akka.stream.scaladsl.Source<HttpEntity.ChunkStreamPart,Mat> source)
source
- (undocumented)public <T extends HttpEntity> scala.Tuple2<T,scala.concurrent.Future<scala.runtime.BoxedUnit>> captureTermination(T entity)
entity
- (undocumented)