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
public abstract static class HttpEntity.ChunkStreamPart extends java.lang.Object
A part of a stream of incoming data for `Transfer-Encoding: chunked` messages.
-
-
Field Summary
Fields Modifier and Type Field Description static HttpEntity.ChunkStreamPart
LAST
The default last ChunkStreamPart that has no extension and no trailer headers.
-
Constructor Summary
Constructors Constructor Description ChunkStreamPart()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static HttpEntity.ChunkStreamPart
create(akka.util.ByteString data)
Creates a chunk from data with an empty extension.static HttpEntity.ChunkStreamPart
create(akka.util.ByteString data, java.lang.String extension)
Creates a chunk from data and extension.static HttpEntity.ChunkStreamPart
createLast(java.lang.String extension, java.lang.Iterable<HttpHeader> trailerHeaders)
Creates a last chunk with extension and headers.abstract akka.util.ByteString
data()
Returns the byte data of this chunk.abstract java.lang.String
extension()
Returns extensions data for this chunk.abstract java.lang.Iterable<HttpHeader>
getTrailerHeaders()
If this is the last chunk, this will return an Iterable of the trailer headers.abstract boolean
isLastChunk()
Returns if this is the last chunk
-
-
-
Field Detail
-
LAST
public static final HttpEntity.ChunkStreamPart LAST
The default last ChunkStreamPart that has no extension and no trailer headers.
-
-
Method Detail
-
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
public abstract java.lang.String extension()
Returns extensions data for this chunk.
-
isLastChunk
public abstract boolean isLastChunk()
Returns if this is the last chunk
-
getTrailerHeaders
public abstract java.lang.Iterable<HttpHeader> getTrailerHeaders()
If this is the last chunk, this will return an Iterable of the trailer headers. Otherwise, it will be empty.
-
create
public static HttpEntity.ChunkStreamPart create(akka.util.ByteString data, java.lang.String extension)
Creates a chunk from data and extension.
-
create
public static HttpEntity.ChunkStreamPart create(akka.util.ByteString data)
Creates a chunk from data with an empty extension.
-
createLast
public static HttpEntity.ChunkStreamPart createLast(java.lang.String extension, java.lang.Iterable<HttpHeader> trailerHeaders)
Creates a last chunk with extension and headers.
-
-