-
- All Known Implementing Classes:
IdentityCompressionFactory
,JdkCompressionFactory
,OptionalBrotliCompressionFactory
,OptionalZstdCompressionFactory
public interface CompressionFactory
The strategy to create on-the-fly decompressingInputStream
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.io.InputStream
decompressing(java.io.InputStream in, java.lang.String type)
Wraps the providedInputStream
into 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.IOException
Wraps the providedInputStream
into stream capable of decompressingsupported()
compression algorithms.- Parameters:
in
- The input stream.type
- One ofsupported()
types.- Returns:
- Wrapped input stream.
- Throws:
java.io.IOException
- Whenin
does not represent a supported compression type or I/O error occures.java.lang.IllegalArgumentException
- When typesupported()
does not containtype
.
-
-