Class HttpEntity.LastChunk
java.lang.Object
org.apache.pekko.http.javadsl.model.HttpEntity.ChunkStreamPart
org.apache.pekko.http.scaladsl.model.HttpEntity.ChunkStreamPart
org.apache.pekko.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 org.apache.pekko.http.javadsl.model.HttpEntity.ChunkStreamPart
LAST -
Constructor Summary
ConstructorsConstructorDescriptionLastChunk(String extension, scala.collection.immutable.Seq<HttpHeader> trailer) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.pekko.util.ByteStringdata()Returns the byte data of this chunk.Returns extensions data for this chunk.Java APIbooleanReturns if this is the last chunkscala.collection.immutable.Seq<HttpHeader>trailer()Methods inherited from class org.apache.pekko.http.javadsl.model.HttpEntity.ChunkStreamPart
create, create, createLastMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface scala.Equals
canEqual, equalsMethods inherited from interface scala.Product
productArity, productElement, productElementName, productElementNames, productIterator, productPrefix
-
Constructor Details
-
LastChunk
-
-
Method Details
-
extension
Description copied from class:HttpEntity.ChunkStreamPartReturns extensions data for this chunk.- Specified by:
extensionin classHttpEntity.ChunkStreamPart
-
trailer
-
data
public org.apache.pekko.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
Java API- Specified by:
getTrailerHeadersin classHttpEntity.ChunkStreamPart
-