Class CommonsCompressCodecFactory
java.lang.Object
org.apache.hc.client5.http.entity.compress.CommonsCompressCodecFactory
Codecs factory for Apache Commons Compress.
Use runtimeAvailable(ContentCoding) to probe whether a given coding
can be provided by the current classpath configuration. Callers can then
register codecs conditionally without hard dependencies.
- Since:
- 5.6
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static org.apache.hc.core5.io.IOFunction<InputStream, InputStream> Creates a lazy decoder that instantiates the Commons Compress stream.(package private) static org.apache.hc.core5.io.IOFunction<OutputStream, OutputStream> Creates a lazy encoder that instantiates the Commons Compress stream.private static boolean(package private) static booleanruntimeAvailable(ContentCoding coding) Best-effort availability probe for optional Commons-Compress codecs.
-
Field Details
-
FACTORY_CLASS
- See Also:
-
CC_BROTLI
- See Also:
-
CC_ZSTD
- See Also:
-
CC_XZ
- See Also:
-
CC_LZMA
- See Also:
-
CC_LZ4_F
- See Also:
-
CC_LZ4_B
- See Also:
-
CC_BZIP2
- See Also:
-
CC_PACK200
- See Also:
-
CC_DEFLATE64
- See Also:
-
H_BROTLI
- See Also:
-
H_ZSTD
- See Also:
-
H_XZ
- See Also:
-
-
Constructor Details
-
CommonsCompressCodecFactory
private CommonsCompressCodecFactory()
-
-
Method Details
-
isPresent
-
decoder
Creates a lazy decoder that instantiates the Commons Compress stream. -
encoder
Creates a lazy encoder that instantiates the Commons Compress stream. -
runtimeAvailable
Best-effort availability probe for optional Commons-Compress codecs.Returns
trueonly if the CC factory and the codec-specific implementation (and helper classes if required) are present on the classpath. Built-in gzip/deflate are handled elsewhere and are not probed here.
-