Interface StreamDecoderFactory
- All Superinterfaces:
StreamDecoderFactory
An interface that constructs a new
StreamDecoder
for a given Content-Encoding header value.
A new decoder is valid for the lifetime of an HttpMessage
.-
Method Summary
Modifier and TypeMethodDescriptionstatic StreamDecoderFactory
brotli()
Returns theStreamDecoderFactory
for"br"
content encoding.static StreamDecoderFactory
deflate()
Returns theStreamDecoderFactory
for"deflate"
content encoding.Returns the value of the Content-Encoding header which this factory applies to.static StreamDecoderFactory
gzip()
Returns theStreamDecoderFactory
for"gzip"
content encoding.default StreamDecoder
newDecoder
(ByteBufAllocator alloc) Construct a newStreamDecoder
to use to decode anHttpMessage
.newDecoder
(ByteBufAllocator alloc, int maxLength) Construct a newStreamDecoder
to use to decode anHttpMessage
.
-
Method Details
-
deflate
Returns theStreamDecoderFactory
for"deflate"
content encoding. -
gzip
Returns theStreamDecoderFactory
for"gzip"
content encoding. -
brotli
Returns theStreamDecoderFactory
for"br"
content encoding. -
encodingHeaderValue
String encodingHeaderValue()Returns the value of the Content-Encoding header which this factory applies to.- Specified by:
encodingHeaderValue
in interfaceStreamDecoderFactory
-
newDecoder
Construct a newStreamDecoder
to use to decode anHttpMessage
.- Specified by:
newDecoder
in interfaceStreamDecoderFactory
- Parameters:
alloc
- theByteBufAllocator
to allocate a newByteBuf
for the decodedHttpMessage
.
-
newDecoder
Construct a newStreamDecoder
to use to decode anHttpMessage
.- Specified by:
newDecoder
in interfaceStreamDecoderFactory
- Parameters:
alloc
- theByteBufAllocator
to allocate a newByteBuf
for the decodedHttpMessage
.maxLength
- the maximum allowed length of a decoded content. If the total length of the decoded content exceedsmaxLength
, aContentTooLargeException
will be raised.
-