Class CompressorUtil


  • public final class CompressorUtil
    extends java.lang.Object
    Utilities for resolving SPI Compressors.

    This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.

    See Also:
    CompressorProvider
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private CompressorUtil()  
    • Field Detail

      • compressorRegistry

        private static final java.util.Map<java.lang.String,​Compressor> compressorRegistry
    • Constructor Detail

      • CompressorUtil

        private CompressorUtil()
    • Method Detail

      • validateAndResolveCompressor

        @Nullable
        public static Compressor validateAndResolveCompressor​(java.lang.String compressionMethod)
        Validate that the compressionMethod is "none" or matches a registered compressor.
        Returns:
        null if compressionMethod is "none" or the registered compressor
        Throws:
        java.lang.IllegalArgumentException - if no match is found
      • buildCompressorRegistry

        private static java.util.Map<java.lang.String,​Compressor> buildCompressorRegistry()