Class HttpEntity.ChunkStreamPart

Direct Known Subclasses:
Enclosing interface:

public abstract static class HttpEntity.ChunkStreamPart extends Object
A part of a stream of incoming data for `Transfer-Encoding: chunked` messages.
  • Field Details

    • LAST

      public static final HttpEntity.ChunkStreamPart 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

      public abstract String extension()
      Returns extensions data for this chunk.
    • isLastChunk

      public abstract boolean isLastChunk()
      Returns if this is the last chunk
    • getTrailerHeaders

      public abstract 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, 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(String extension, Iterable<HttpHeader> trailerHeaders)
      Creates a last chunk with extension and headers.