Package akka.http.scaladsl.model
Class HttpEntity$
java.lang.Object
akka.http.scaladsl.model.HttpEntity$
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HttpEntity$
Static reference to the singleton instance of this Scala object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply
(byte[] bytes) apply
(ContentType.NonBinary contentType, String string) apply
(ContentType.WithFixedCharset contentType, String string) apply
(ContentType contentType, byte[] bytes) apply
(ContentType contentType, long contentLength, akka.stream.scaladsl.Source<akka.util.ByteString, Object> data) apply
(ContentType contentType, akka.stream.scaladsl.Source<akka.util.ByteString, Object> data) apply
(ContentType contentType, akka.util.ByteString data) apply
(akka.util.ByteString data) <T extends HttpEntity>
scala.Tuple2<T,scala.concurrent.Future<scala.runtime.BoxedUnit>> captureTermination
(T entity) INTERNAL APIempty
(ContentType contentType) Empty()
fromFile
(ContentType contentType, File file, int chunkSize) Returns either the empty entity, if the given file is empty, or aHttpEntity.Default
entity consisting of a stream ofByteString
instances each containingchunkSize
bytes (except for the final ByteString, which simply contains the remaining bytes).fromPath
(ContentType contentType, Path file, int chunkSize) Returns either the empty entity, if the given file is empty, or aHttpEntity.Default
entity consisting of a stream ofByteString
instances each containingchunkSize
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. .<Mat> akka.stream.scaladsl.Source<HttpEntity.ChunkStreamPart,
Mat> limitableChunkSource
(akka.stream.scaladsl.Source<HttpEntity.ChunkStreamPart, Mat> source) Deprecated.Not needed explicitly any more. .
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
HttpEntity$
public HttpEntity$()
-
-
Method Details
-
apply
-
apply
-
apply
-
apply
-
apply
-
apply
-
apply
-
apply
public UniversalEntity apply(ContentType contentType, long contentLength, akka.stream.scaladsl.Source<akka.util.ByteString, Object> data) -
apply
public HttpEntity.Chunked apply(ContentType contentType, akka.stream.scaladsl.Source<akka.util.ByteString, Object> data) -
fromFile
Returns either the empty entity, if the given file is empty, or aHttpEntity.Default
entity consisting of a stream ofByteString
instances each containingchunkSize
bytes (except for the final ByteString, which simply contains the remaining bytes).If the given
chunkSize
is -1 the default chunk size is used.- Parameters:
contentType
- (undocumented)file
- (undocumented)chunkSize
- (undocumented)- Returns:
- (undocumented)
-
fromPath
Returns either the empty entity, if the given file is empty, or aHttpEntity.Default
entity consisting of a stream ofByteString
instances each containingchunkSize
bytes (except for the final ByteString, which simply contains the remaining bytes).If the given
chunkSize
is -1 the default chunk size is used.- Parameters:
contentType
- (undocumented)file
- (undocumented)chunkSize
- (undocumented)- Returns:
- (undocumented)
-
Empty
-
empty
-
limitableByteSource
public <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.Deprecated: no-op, not explicitly needed any more.- Parameters:
source
- (undocumented)- Returns:
- (undocumented)
-
limitableChunkSource
public <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.Deprecated: no-op, not explicitly needed any more.- Parameters:
source
- (undocumented)- Returns:
- (undocumented)
-
captureTermination
public <T extends HttpEntity> scala.Tuple2<T,scala.concurrent.Future<scala.runtime.BoxedUnit>> captureTermination(T entity) INTERNAL API- Parameters:
entity
- (undocumented)- Returns:
- (undocumented)
-