Package org.microproxy.http
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 Summary
Modifier and TypeMethodDescriptionstatic LastHttpContentempty()Returns a new, empty last-content marker with no trailer fields.setContent(byte[] content) Replaces the body bytes of this piece.Returns the mutable trailer fields following the body.Methods inherited from interface org.microproxy.http.HttpContent
content, contentAsString, contentAsString, contentLength
-
Method Details
-
trailingHeaders
HttpHeaders trailingHeaders()Returns the mutable trailer fields following the body.- Returns:
- the mutable trailer fields following the body
-
setContent
Description copied from interface:HttpContentReplaces the body bytes of this piece.- Specified by:
setContentin interfaceHttpContent- Parameters:
content- new backing array, retained without copying- Returns:
- this content object
-
empty
Returns a new, empty last-content marker with no trailer fields.- Returns:
- a new, empty last-content marker with no trailer fields
-