Class 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 Detail

      • LAST

        public static final HttpEntity.ChunkStreamPart LAST
        The default last ChunkStreamPart that has no extension and no trailer headers.
    • Constructor Detail

      • ChunkStreamPart

        public ChunkStreamPart()
    • 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.