Class HttpEntity$
java.lang.Object
org.apache.pekko.http.scaladsl.model.HttpEntity$
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final HttpEntity$Static reference to the singleton instance of this Scala object.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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, org.apache.pekko.stream.scaladsl.Source<org.apache.pekko.util.ByteString, Object> data) apply(ContentType contentType, org.apache.pekko.stream.scaladsl.Source<org.apache.pekko.util.ByteString, Object> data) apply(ContentType contentType, org.apache.pekko.util.ByteString data) apply(org.apache.pekko.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.Defaultentity consisting of a stream ofpekko.util.ByteStringinstances each containingchunkSizebytes (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.Defaultentity consisting of a stream ofpekko.util.ByteStringinstances each containingchunkSizebytes (except for the final ByteString, which simply contains the remaining bytes).
- 
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
- 
applypublic UniversalEntity apply(ContentType contentType, long contentLength, org.apache.pekko.stream.scaladsl.Source<org.apache.pekko.util.ByteString, Object> data) 
- 
applypublic HttpEntity.Chunked apply(ContentType contentType, org.apache.pekko.stream.scaladsl.Source<org.apache.pekko.util.ByteString, Object> data) 
- 
fromFileReturns either the empty entity, if the given file is empty, or aHttpEntity.Defaultentity consisting of a stream ofpekko.util.ByteStringinstances each containingchunkSizebytes (except for the final ByteString, which simply contains the remaining bytes).If the given chunkSizeis -1 the default chunk size is used.- Parameters:
- contentType- (undocumented)
- file- (undocumented)
- chunkSize- (undocumented)
- Returns:
- (undocumented)
 
- 
fromPathReturns either the empty entity, if the given file is empty, or aHttpEntity.Defaultentity consisting of a stream ofpekko.util.ByteStringinstances each containingchunkSizebytes (except for the final ByteString, which simply contains the remaining bytes).If the given chunkSizeis -1 the default chunk size is used.- Parameters:
- contentType- (undocumented)
- file- (undocumented)
- chunkSize- (undocumented)
- Returns:
- (undocumented)
 
- 
Empty
- 
empty
- 
captureTerminationpublic <T extends HttpEntity> scala.Tuple2<T,scala.concurrent.Future<scala.runtime.BoxedUnit>> captureTermination(T entity) INTERNAL API- Parameters:
- entity- (undocumented)
- Returns:
- (undocumented)
 
 
-