Top Description Methods
io.netty5.handler.codec.http

public Interface HttpContent<R extends HttpContent<R>>

extends HttpObject, Resource<R extends HttpContent<R>>
Known Direct Subinterfaces
io.netty5.handler.codec.http.LastHttpContent
Known Direct Implementers
io.netty5.handler.codec.http.DefaultHttpContent
Imports
io.netty5.buffer.Buffer, io.netty5.util.Resource, io.netty5.channel.ChannelPipeline

An HTTP chunk which is used for HTTP chunked transfer-encoding. HttpObjectDecoder generates HttpContent after HttpMessage when the content is large or the encoding of the content is 'chunked. If you prefer not to receive HttpContent in your handler, place HttpObjectAggregator after HttpObjectDecoder in the ChannelPipeline.

Method Summary

Modifier and TypeMethod and Description
public R

Returns:

A copy of this HTTP content object.
copy
()

Create a copy of this HTTP content instance, and return it.

public Buffer

Returns:

The Buffer representing the payload of the HTTP message.
payload
()

Returns the Buffer representing the payload of the HTTP message.

Inherited from io.netty5.util.Resource:
closedisposeisAccessibleisAccessiblesendtouchtouch

Method Detail

copyback to summary
public R copy()

Create a copy of this HTTP content instance, and return it.

Returns:R

A copy of this HTTP content object.

payloadback to summary
public Buffer payload()

Returns the Buffer representing the payload of the HTTP message.

Returns:Buffer

The Buffer representing the payload of the HTTP message.