Class CompressionUtils
- java.lang.Object
-
- com.linkedin.alpini.netty4.compression.CompressionUtils
-
public class CompressionUtils extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static io.netty.util.AsciiStringDEFLATEstatic io.netty.util.AsciiStringGZIPstatic io.netty.util.AsciiStringSNAPPYstatic java.lang.StringSNAPPY_ENCODINGstatic io.netty.util.AsciiStringSNAPPY_FRAMEDstatic java.lang.StringSNAPPY_FRAMED_ENCODINGstatic io.netty.util.AsciiStringX_DEFLATEstatic io.netty.util.AsciiStringX_GZIPstatic io.netty.util.AsciiStringX_SNAPPYstatic java.lang.StringX_SNAPPY_ENCODING
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisCompatibleEncoding(java.lang.CharSequence encoding, java.lang.CharSequence acceptableEncodings)Test if the specific encoding is permitted by the provided list of encodings as used in HTTPAccepts-Encodingheader.static booleanisStreamingEncoding(java.lang.CharSequence encoding)Test if the specifiedencodingnames an encoding which may be streamed.static booleanisSupportedEncoding(java.lang.CharSequence encoding)Test if the suppliedAccepts-Encodingstring matches any specific supported encoding.static booleanisSupportedSpecificEncoding(java.lang.CharSequence encoding)Test if the specifiedencodingnames a specific supported encoding.static io.netty.channel.ChannelHandlernewSnappyDecoder()static io.netty.channel.ChannelHandlernewSnappyFramedDecoder()
-
-
-
Field Detail
-
SNAPPY_ENCODING
public static final java.lang.String SNAPPY_ENCODING
- See Also:
- Constant Field Values
-
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
-
SNAPPY_FRAMED
public static final io.netty.util.AsciiString SNAPPY_FRAMED
- See Also:
- x-snappy-framed specification
-
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 HTTPAccepts-Encodingheader.- Parameters:
encoding- specific encoding name.acceptableEncodings- Encoding string as used in HTTPAccepts-Encodingheader.- Returns:
trueif the specific encoding is permitted by theacceptableEncodingslist.
-
isSupportedSpecificEncoding
public static boolean isSupportedSpecificEncoding(java.lang.CharSequence encoding)
Test if the specifiedencodingnames a specific supported encoding.- Parameters:
encoding- encoding name- Returns:
trueifencodingmatches a specific supported implementation.
-
isStreamingEncoding
public static boolean isStreamingEncoding(java.lang.CharSequence encoding)
Test if the specifiedencodingnames an encoding which may be streamed.- Parameters:
encoding- encoding name- Returns:
trueifencodingmatches a known streaming encoding.
-
isSupportedEncoding
public static boolean isSupportedEncoding(java.lang.CharSequence encoding)
Test if the suppliedAccepts-Encodingstring matches any specific supported encoding.- Parameters:
encoding- Encoding string as used in HTTPAccepts-Encodingheader.- Returns:
trueifencodingmatches a supported encoding.
-
-