Class CompressionUtils


  • public class CompressionUtils
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isCompatibleEncoding​(java.lang.CharSequence encoding, java.lang.CharSequence acceptableEncodings)
      Test if the specific encoding is permitted by the provided list of encodings as used in HTTP Accepts-Encoding header.
      static boolean isStreamingEncoding​(java.lang.CharSequence encoding)
      Test if the specified encoding names an encoding which may be streamed.
      static boolean isSupportedEncoding​(java.lang.CharSequence encoding)
      Test if the supplied Accepts-Encoding string matches any specific supported encoding.
      static boolean isSupportedSpecificEncoding​(java.lang.CharSequence encoding)
      Test if the specified encoding names a specific supported encoding.
      static io.netty.channel.ChannelHandler newSnappyDecoder()  
      static io.netty.channel.ChannelHandler newSnappyFramedDecoder()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • X_SNAPPY_ENCODING

        public static final java.lang.String X_SNAPPY_ENCODING
        See Also:
        Constant Field Values
      • SNAPPY_FRAMED_ENCODING

        public static final java.lang.String SNAPPY_FRAMED_ENCODING
        See Also:
        Constant Field Values
      • SNAPPY

        public static final io.netty.util.AsciiString SNAPPY
      • X_SNAPPY

        public static final io.netty.util.AsciiString X_SNAPPY
      • GZIP

        public static final io.netty.util.AsciiString GZIP
      • X_GZIP

        public static final io.netty.util.AsciiString X_GZIP
      • DEFLATE

        public static final io.netty.util.AsciiString DEFLATE
      • X_DEFLATE

        public static final io.netty.util.AsciiString X_DEFLATE
    • Method Detail

      • newSnappyDecoder

        public static io.netty.channel.ChannelHandler newSnappyDecoder()
      • newSnappyFramedDecoder

        public static io.netty.channel.ChannelHandler newSnappyFramedDecoder()
      • isCompatibleEncoding

        public static boolean isCompatibleEncoding​(java.lang.CharSequence encoding,
                                                   java.lang.CharSequence acceptableEncodings)
        Test if the specific encoding is permitted by the provided list of encodings as used in HTTP Accepts-Encoding header.
        Parameters:
        encoding - specific encoding name.
        acceptableEncodings - Encoding string as used in HTTP Accepts-Encoding header.
        Returns:
        true if the specific encoding is permitted by the acceptableEncodings list.
      • isSupportedSpecificEncoding

        public static boolean isSupportedSpecificEncoding​(java.lang.CharSequence encoding)
        Test if the specified encoding names a specific supported encoding.
        Parameters:
        encoding - encoding name
        Returns:
        true if encoding matches a specific supported implementation.
      • isStreamingEncoding

        public static boolean isStreamingEncoding​(java.lang.CharSequence encoding)
        Test if the specified encoding names an encoding which may be streamed.
        Parameters:
        encoding - encoding name
        Returns:
        true if encoding matches a known streaming encoding.
      • isSupportedEncoding

        public static boolean isSupportedEncoding​(java.lang.CharSequence encoding)
        Test if the supplied Accepts-Encoding string matches any specific supported encoding.
        Parameters:
        encoding - Encoding string as used in HTTP Accepts-Encoding header.
        Returns:
        true if encoding matches a supported encoding.