Module http.client.ext
Package io.github.nstdio.http.ext
Class BodyHandlers.DecompressingBodyHandlerBuilder
- java.lang.Object
-
- io.github.nstdio.http.ext.BodyHandlers.DecompressingBodyHandlerBuilder
-
- Enclosing class:
- BodyHandlers
public static final class BodyHandlers.DecompressingBodyHandlerBuilder extends java.lang.ObjectThe builder for decompressing body handler.
-
-
Constructor Summary
Constructors Constructor Description DecompressingBodyHandlerBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.http.HttpResponse.BodyHandler<java.io.InputStream>build()Creates the new decompressing body handler.<T> java.net.http.HttpResponse.BodyHandler<T>build(java.net.http.HttpResponse.BodyHandler<T> downstream)Creates the new decompressing body handler.BodyHandlers.DecompressingBodyHandlerBuilderfailOnUnknownDirectives(boolean failOnUnknownDirectives)Sets whether throw exception when unknown compression directive encountered or not.BodyHandlers.DecompressingBodyHandlerBuilderfailOnUnsupportedDirectives(boolean failOnUnsupportedDirectives)Sets whether throw exception when compression directive not supported or not.BodyHandlers.DecompressingBodyHandlerBuilderlenient(boolean lenient)
-
-
-
Method Detail
-
failOnUnsupportedDirectives
public BodyHandlers.DecompressingBodyHandlerBuilder failOnUnsupportedDirectives(boolean failOnUnsupportedDirectives)
Sets whether throw exception when compression directive not supported or not.- Parameters:
failOnUnsupportedDirectives- Whether throw exception when compression directive not supported or not- Returns:
- this for fluent chaining.
-
failOnUnknownDirectives
public BodyHandlers.DecompressingBodyHandlerBuilder failOnUnknownDirectives(boolean failOnUnknownDirectives)
Sets whether throw exception when unknown compression directive encountered or not.- Parameters:
failOnUnknownDirectives- Whether throw exception when unknown compression directive encountered or not- Returns:
- this for fluent chaining.
-
lenient
public BodyHandlers.DecompressingBodyHandlerBuilder lenient(boolean lenient)
-
build
public java.net.http.HttpResponse.BodyHandler<java.io.InputStream> build()
Creates the new decompressing body handler.- Returns:
- The builder for decompressing body handler.
-
build
public <T> java.net.http.HttpResponse.BodyHandler<T> build(java.net.http.HttpResponse.BodyHandler<T> downstream)
Creates the new decompressing body handler.Please use
build()ifdownstreamisHttpResponse.BodyHandlers.ofInputStream().- Returns:
- The builder for decompressing body handler.
-
-