Module methanol.brotli
Class BrotliBodyDecoderFactory
java.lang.Object
com.github.mizosoft.methanol.brotli.internal.BrotliBodyDecoderFactory
- All Implemented Interfaces:
BodyDecoder.Factory
BodyDecoder.Factory
provider for brotli encoding.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> BodyDecoder
<T> create
(HttpResponse.BodySubscriber<T> downstream) Creates and returns aBodyDecoder
with the given downstream.<T> BodyDecoder
<T> create
(HttpResponse.BodySubscriber<T> downstream, Executor executor) Creates and returns aBodyDecoder
with the given downstream and executor.encoding()
Returns the encoding used byBodyDecoders
created by this factory.
-
Constructor Details
-
BrotliBodyDecoderFactory
Creates a newBrotliBodyDecoderFactory
. Meant to be called by theServiceLoader
class.- Throws:
IOException
- if the native brotli library cannot be loadedUnsupportedOperationException
- if the current machine is not recognized
-
-
Method Details
-
encoding
Description copied from interface:BodyDecoder.Factory
Returns the encoding used byBodyDecoders
created by this factory.- Specified by:
encoding
in interfaceBodyDecoder.Factory
-
create
Description copied from interface:BodyDecoder.Factory
Creates and returns aBodyDecoder
with the given downstream.- Specified by:
create
in interfaceBodyDecoder.Factory
- Type Parameters:
T
- the body type- Parameters:
downstream
- the downstream subscriber
-
create
Description copied from interface:BodyDecoder.Factory
Creates and returns aBodyDecoder
with the given downstream and executor.- Specified by:
create
in interfaceBodyDecoder.Factory
- Type Parameters:
T
- the body type- Parameters:
downstream
- the downstream subscriberexecutor
- the decoder's executor
-