Package akka.http.scaladsl.model
Class HttpEntity$
- java.lang.Object
-
- akka.http.scaladsl.model.HttpEntity$
-
public class HttpEntity$ extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static HttpEntity$
MODULE$
Static reference to the singleton instance of this Scala object.
-
Constructor Summary
Constructors Constructor Description HttpEntity$()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description HttpEntity.Strict
apply(byte[] bytes)
HttpEntity.Strict
apply(ContentType.NonBinary contentType, java.lang.String string)
HttpEntity.Strict
apply(ContentType.WithFixedCharset contentType, java.lang.String string)
HttpEntity.Strict
apply(ContentType contentType, byte[] bytes)
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(ContentType contentType, akka.util.ByteString data)
HttpEntity.Strict
apply(akka.util.ByteString data)
HttpEntity.Strict
apply(java.lang.String string)
<T extends HttpEntity>
scala.Tuple2<T,scala.concurrent.Future<scala.runtime.BoxedUnit>>captureTermination(T entity)
INTERNAL APIHttpEntity.Strict
empty(ContentType contentType)
HttpEntity.Strict
Empty()
UniversalEntity
fromFile(ContentType contentType, java.io.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).UniversalEntity
fromPath(ContentType contentType, java.nio.file.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 Detail
-
MODULE$
public static final HttpEntity$ MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Method Detail
-
apply
public HttpEntity.Strict apply(java.lang.String string)
-
apply
public HttpEntity.Strict apply(byte[] bytes)
-
apply
public HttpEntity.Strict apply(akka.util.ByteString data)
-
apply
public HttpEntity.Strict apply(ContentType.NonBinary contentType, java.lang.String string)
-
apply
public HttpEntity.Strict apply(ContentType.WithFixedCharset contentType, java.lang.String string)
-
apply
public HttpEntity.Strict apply(ContentType contentType, byte[] bytes)
-
apply
public HttpEntity.Strict apply(ContentType contentType, akka.util.ByteString data)
-
apply
public UniversalEntity apply(ContentType contentType, long contentLength, akka.stream.scaladsl.Source<akka.util.ByteString,java.lang.Object> data)
-
apply
public HttpEntity.Chunked apply(ContentType contentType, akka.stream.scaladsl.Source<akka.util.ByteString,java.lang.Object> data)
-
fromFile
public UniversalEntity fromFile(ContentType contentType, java.io.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).If the given
chunkSize
is -1 the default chunk size is used.- Parameters:
contentType
- (undocumented)file
- (undocumented)chunkSize
- (undocumented)- Returns:
- (undocumented)
-
fromPath
public UniversalEntity fromPath(ContentType contentType, java.nio.file.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).If the given
chunkSize
is -1 the default chunk size is used.- Parameters:
contentType
- (undocumented)file
- (undocumented)chunkSize
- (undocumented)- Returns:
- (undocumented)
-
Empty
public HttpEntity.Strict Empty()
-
empty
public HttpEntity.Strict empty(ContentType contentType)
-
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)
-
-