Interface CompressionCodec.Factory

All Known Implementing Classes:
CommonsCompressionFactory, NoCompressionCodec.Factory
Enclosing interface:
CompressionCodec

public static interface CompressionCodec.Factory
Factory to create compression codec.
  • Field Details

    • INSTANCE

      static final CompressionCodec.Factory INSTANCE
      This combines all the available factories registered as service providers in the module path. For each compression codec type, it will use whatever factory supports it, i.e. doesn't throw on `createCodec(type)`. If multiple factories registered as service providers support the same codec type, the first one encountered while iterating over the ServiceLoader will be selected. A codec type that is not supported by any registered service provider will fall back to NoCompressionCodec.Factory.INSTANCE for backwards compatibility.
  • Method Details