-
- All Known Implementing Classes:
IdentityCompressionFactory,JdkCompressionFactory,OptionalBrotliCompressionFactory,OptionalZstdCompressionFactory
public interface CompressionFactoryThe strategy to create on-the-fly decompressingInputStream.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.io.InputStreamdecompressing(java.io.InputStream in, java.lang.String type)Wraps the providedInputStreaminto stream capable of decompressingsupported()compression algorithms.java.util.List<java.lang.String>supported()The list of supported decompression directives like:
-
-
-
Method Detail
-
supported
java.util.List<java.lang.String> supported()
The list of supported decompression directives like:List.of("gzip", "x-gzip")- Returns:
- Supported types. Never null.
-
decompressing
java.io.InputStream decompressing(java.io.InputStream in, java.lang.String type) throws java.io.IOExceptionWraps the providedInputStreaminto stream capable of decompressingsupported()compression algorithms.- Parameters:
in- The input stream.type- One ofsupported()types.- Returns:
- Wrapped input stream.
- Throws:
java.io.IOException- Whenindoes not represent a supported compression type or I/O error occures.java.lang.IllegalArgumentException- When typesupported()does not containtype.
-
-