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.AsciiString
DEFLATE
static io.netty.util.AsciiString
GZIP
static io.netty.util.AsciiString
SNAPPY
static java.lang.String
SNAPPY_ENCODING
static io.netty.util.AsciiString
SNAPPY_FRAMED
static java.lang.String
SNAPPY_FRAMED_ENCODING
static io.netty.util.AsciiString
X_DEFLATE
static io.netty.util.AsciiString
X_GZIP
static io.netty.util.AsciiString
X_SNAPPY
static java.lang.String
X_SNAPPY_ENCODING
-
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 HTTPAccepts-Encoding
header.static boolean
isStreamingEncoding(java.lang.CharSequence encoding)
Test if the specifiedencoding
names an encoding which may be streamed.static boolean
isSupportedEncoding(java.lang.CharSequence encoding)
Test if the suppliedAccepts-Encoding
string matches any specific supported encoding.static boolean
isSupportedSpecificEncoding(java.lang.CharSequence encoding)
Test if the specifiedencoding
names a specific supported encoding.static io.netty.channel.ChannelHandler
newSnappyDecoder()
static io.netty.channel.ChannelHandler
newSnappyFramedDecoder()
-
-
-
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-Encoding
header.- Parameters:
encoding
- specific encoding name.acceptableEncodings
- Encoding string as used in HTTPAccepts-Encoding
header.- Returns:
true
if the specific encoding is permitted by theacceptableEncodings
list.
-
isSupportedSpecificEncoding
public static boolean isSupportedSpecificEncoding(java.lang.CharSequence encoding)
Test if the specifiedencoding
names a specific supported encoding.- Parameters:
encoding
- encoding name- Returns:
true
ifencoding
matches a specific supported implementation.
-
isStreamingEncoding
public static boolean isStreamingEncoding(java.lang.CharSequence encoding)
Test if the specifiedencoding
names an encoding which may be streamed.- Parameters:
encoding
- encoding name- Returns:
true
ifencoding
matches a known streaming encoding.
-
isSupportedEncoding
public static boolean isSupportedEncoding(java.lang.CharSequence encoding)
Test if the suppliedAccepts-Encoding
string matches any specific supported encoding.- Parameters:
encoding
- Encoding string as used in HTTPAccepts-Encoding
header.- Returns:
true
ifencoding
matches a supported encoding.
-
-