Interface LastHttpContent

All Superinterfaces:
HttpContent, HttpObject
All Known Subinterfaces:
FullHttpMessage, FullHttpRequest, FullHttpResponse
All Known Implementing Classes:
DefaultFullHttpRequest, DefaultFullHttpResponse, DefaultLastHttpContent, HttpCache.Answer, ServerReplay.Replayed

public sealed interface LastHttpContent extends HttpContent permits FullHttpMessage, DefaultLastHttpContent
The final piece of an HTTP message body, optionally carrying trailer fields.
  • Method Details

    • trailingHeaders

      HttpHeaders trailingHeaders()
      Returns the mutable trailer fields following the body.
      Returns:
      the mutable trailer fields following the body
    • setContent

      LastHttpContent setContent(byte[] content)
      Description copied from interface: HttpContent
      Replaces the body bytes of this piece.
      Specified by:
      setContent in interface HttpContent
      Parameters:
      content - new backing array, retained without copying
      Returns:
      this content object
    • empty

      static LastHttpContent empty()
      Returns a new, empty last-content marker with no trailer fields.
      Returns:
      a new, empty last-content marker with no trailer fields