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:
Serializable
,scala.Equals
,scala.Product
- Direct Known Subclasses:
HttpEntity.LastChunk$
- Enclosing interface:
- HttpEntity
public static class HttpEntity.LastChunk
extends HttpEntity.ChunkStreamPart
implements scala.Product, 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 the
LastChunk
companion object.- See Also:
-
Field Summary
Fields inherited from class akka.http.javadsl.model.HttpEntity.ChunkStreamPart
LAST
-
Constructor Summary
ConstructorsConstructorDescriptionLastChunk
(String extension, scala.collection.immutable.Seq<HttpHeader> trailer) -
Method Summary
Modifier and TypeMethodDescriptionakka.util.ByteString
data()
Returns the byte data of this chunk.Returns extensions data for this chunk.Java APIboolean
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface scala.Equals
canEqual, equals
Methods inherited from interface scala.Product
productArity, productElement, productElementName, productElementNames, productIterator, productPrefix
-
Constructor Details
-
LastChunk
-
-
Method Details
-
extension
Description copied from class:HttpEntity.ChunkStreamPart
Returns extensions data for this chunk.- Specified by:
extension
in classHttpEntity.ChunkStreamPart
-
trailer
-
data
public akka.util.ByteString data()Description copied from class:HttpEntity.ChunkStreamPart
Returns the byte data of this chunk. Will be non-empty for every regular chunk. Will be empty for the last chunk.- Specified by:
data
in classHttpEntity.ChunkStreamPart
-
isLastChunk
public boolean isLastChunk()Description copied from class:HttpEntity.ChunkStreamPart
Returns if this is the last chunk- Specified by:
isLastChunk
in classHttpEntity.ChunkStreamPart
-
getTrailerHeaders
Java API- Specified by:
getTrailerHeaders
in classHttpEntity.ChunkStreamPart
-