- java.lang.Object
-
- io.github.nstdio.http.ext.spi.OptionalBrotliCompressionFactory
-
- All Implemented Interfaces:
CompressionFactory
public class OptionalBrotliCompressionFactory extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description OptionalBrotliCompressionFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.InputStreamdecompressing(java.io.InputStream in, java.lang.String type)Wraps the providedInputStreaminto stream capable of decompressingCompressionFactory.supported()compression algorithms.java.util.List<java.lang.String>supported()The list of supported decompression directives like:
-
-
-
Method Detail
-
supported
public java.util.List<java.lang.String> supported()
Description copied from interface:CompressionFactoryThe list of supported decompression directives like:List.of("gzip", "x-gzip")- Returns:
- Supported types. Never null.
-
decompressing
public final java.io.InputStream decompressing(java.io.InputStream in, java.lang.String type) throws java.io.IOExceptionDescription copied from interface:CompressionFactoryWraps the providedInputStreaminto stream capable of decompressingCompressionFactory.supported()compression algorithms.- Specified by:
decompressingin interfaceCompressionFactory- Parameters:
in- The input stream.type- One ofCompressionFactory.supported()types.- Returns:
- Wrapped input stream.
- Throws:
java.io.IOException- Whenindoes not represent a supported compression type or I/O error occures.
-
-