Package akka.http.javadsl.model
Class HttpEntity.ChunkStreamPart
java.lang.Object
akka.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 Summary
FieldsModifier and TypeFieldDescriptionstatic final HttpEntity.ChunkStreamPart
The default last ChunkStreamPart that has no extension and no trailer headers. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpEntity.ChunkStreamPart
create
(akka.util.ByteString data) Creates a chunk from data with an empty extension.static HttpEntity.ChunkStreamPart
Creates a chunk from data and extension.static HttpEntity.ChunkStreamPart
createLast
(String extension, Iterable<HttpHeader> trailerHeaders) Creates a last chunk with extension and headers.abstract akka.util.ByteString
data()
Returns the byte data of this chunk.abstract String
Returns extensions data for this chunk.abstract Iterable<HttpHeader>
If this is the last chunk, this will return an Iterable of the trailer headers.abstract boolean
Returns if this is the last chunk
-
Field Details
-
LAST
The default last ChunkStreamPart that has no extension and no trailer headers.
-
-
Constructor Details
-
ChunkStreamPart
public ChunkStreamPart()
-
-
Method Details
-
data
public abstract akka.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. -
extension
Returns extensions data for this chunk. -
isLastChunk
public abstract boolean isLastChunk()Returns if this is the last chunk -
getTrailerHeaders
If this is the last chunk, this will return an Iterable of the trailer headers. Otherwise, it will be empty. -
create
Creates a chunk from data and extension. -
create
Creates a chunk from data with an empty extension. -
createLast
public static HttpEntity.ChunkStreamPart createLast(String extension, Iterable<HttpHeader> trailerHeaders) Creates a last chunk with extension and headers.
-