Class HttpEntity.ChunkStreamPart
java.lang.Object
org.apache.pekko.http.javadsl.model.HttpEntity.ChunkStreamPart
- Direct Known Subclasses:
- HttpEntity.ChunkStreamPart
- Enclosing interface:
- HttpEntity
A part of a stream of incoming data for `Transfer-Encoding: chunked` messages.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final HttpEntity.ChunkStreamPartThe default last ChunkStreamPart that has no extension and no trailer headers.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic HttpEntity.ChunkStreamPartcreate(org.apache.pekko.util.ByteString data) Creates a chunk from data with an empty extension.static HttpEntity.ChunkStreamPartCreates a chunk from data and extension.static HttpEntity.ChunkStreamPartcreateLast(String extension, Iterable<HttpHeader> trailerHeaders) Creates a last chunk with extension and headers.abstract org.apache.pekko.util.ByteStringdata()Returns the byte data of this chunk.abstract StringReturns extensions data for this chunk.abstract Iterable<HttpHeader>If this is the last chunk, this will return an Iterable of the trailer headers.abstract booleanReturns if this is the last chunk
- 
Field Details- 
LASTThe default last ChunkStreamPart that has no extension and no trailer headers.
 
- 
- 
Constructor Details- 
ChunkStreamPartpublic ChunkStreamPart()
 
- 
- 
Method Details- 
datapublic abstract org.apache.pekko.util.ByteString data()Returns the byte data of this chunk. Will be non-empty for every regular chunk. Will be empty for the last chunk.
- 
extensionReturns extensions data for this chunk.
- 
isLastChunkpublic abstract boolean isLastChunk()Returns if this is the last chunk
- 
getTrailerHeadersIf this is the last chunk, this will return an Iterable of the trailer headers. Otherwise, it will be empty.
- 
createpublic static HttpEntity.ChunkStreamPart create(org.apache.pekko.util.ByteString data, String extension) Creates a chunk from data and extension.
- 
createCreates a chunk from data with an empty extension.
- 
createLastpublic static HttpEntity.ChunkStreamPart createLast(String extension, Iterable<HttpHeader> trailerHeaders) Creates a last chunk with extension and headers.
 
-