- java.lang.Object
-
- io.github.nstdio.http.ext.spi.IdentityCompressionFactory
-
- All Implemented Interfaces:
CompressionFactory
public class IdentityCompressionFactory extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description IdentityCompressionFactory()
-
Method Summary
All Methods Instance Methods Concrete 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 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:CompressionFactory
The 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.IOException
Description copied from interface:CompressionFactory
Wraps the providedInputStream
into stream capable of decompressingCompressionFactory.supported()
compression algorithms.- Specified by:
decompressing
in interfaceCompressionFactory
- Parameters:
in
- The input stream.type
- One ofCompressionFactory.supported()
types.- Returns:
- Wrapped input stream.
- Throws:
java.io.IOException
- Whenin
does not represent a supported compression type or I/O error occures.
-
-