Package akka.http.scaladsl.model
Class HttpEntity.LastChunk
- java.lang.Object
-
- akka.http.javadsl.model.HttpEntity.ChunkStreamPart
-
- akka.http.scaladsl.model.HttpEntity.ChunkStreamPart
-
- akka.http.scaladsl.model.HttpEntity.LastChunk
-
- All Implemented Interfaces:
java.io.Serializable,scala.Equals,scala.Product
- Direct Known Subclasses:
HttpEntity.LastChunk$
- Enclosing interface:
- HttpEntity
public static class HttpEntity.LastChunk extends HttpEntity.ChunkStreamPart implements scala.Product, java.io.Serializable
The final chunk of a chunk stream. If you don't need extensions or trailer headers you can save an allocation by directly using theLastChunkcompanion object.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class akka.http.javadsl.model.HttpEntity.ChunkStreamPart
LAST
-
-
Constructor Summary
Constructors Constructor Description LastChunk(java.lang.String extension, scala.collection.immutable.Seq<HttpHeader> trailer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description akka.util.ByteStringdata()Returns the byte data of this chunk.java.lang.Stringextension()Returns extensions data for this chunk.java.lang.Iterable<HttpHeader>getTrailerHeaders()Java APIbooleanisLastChunk()Returns if this is the last chunkscala.collection.immutable.Seq<HttpHeader>trailer()-
Methods inherited from class akka.http.javadsl.model.HttpEntity.ChunkStreamPart
create, create, createLast
-
-
-
-
Constructor Detail
-
LastChunk
public LastChunk(java.lang.String extension, scala.collection.immutable.Seq<HttpHeader> trailer)
-
-
Method Detail
-
extension
public java.lang.String extension()
Description copied from class:HttpEntity.ChunkStreamPartReturns extensions data for this chunk.- Specified by:
extensionin classHttpEntity.ChunkStreamPart
-
trailer
public scala.collection.immutable.Seq<HttpHeader> trailer()
-
data
public akka.util.ByteString data()
Description copied from class:HttpEntity.ChunkStreamPartReturns the byte data of this chunk. Will be non-empty for every regular chunk. Will be empty for the last chunk.- Specified by:
datain classHttpEntity.ChunkStreamPart
-
isLastChunk
public boolean isLastChunk()
Description copied from class:HttpEntity.ChunkStreamPartReturns if this is the last chunk- Specified by:
isLastChunkin classHttpEntity.ChunkStreamPart
-
getTrailerHeaders
public java.lang.Iterable<HttpHeader> getTrailerHeaders()
Java API- Specified by:
getTrailerHeadersin classHttpEntity.ChunkStreamPart
-
-