Package org.glassfish.grizzly.http
Class LZMAContentEncoding
- java.lang.Object
-
- org.glassfish.grizzly.http.LZMAContentEncoding
-
- All Implemented Interfaces:
ContentEncoding
public class LZMAContentEncoding extends Object implements ContentEncoding
-
-
Constructor Summary
Constructors Constructor Description LZMAContentEncoding()LZMAContentEncoding(EncodingFilter encodingFilter)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ParsingResultdecode(org.glassfish.grizzly.Connection connection, HttpContent httpContent)Decode HTTP packet content represented byHttpContent.HttpContentencode(org.glassfish.grizzly.Connection connection, HttpContent httpContent)Encode HTTP packet content represented byHttpContent.booleanequals(Object o)String[]getAliases()Get the ContentEncoding aliases.static String[]getLzmaAliases()StringgetName()Get the ContentEncoding name.inthashCode()booleanwantDecode(HttpHeader header)Method should implement the logic, which decides if HTTP packet with the specificHttpHeadershould be decoded using this ContentEncoding.booleanwantEncode(HttpHeader header)Method should implement the logic, which decides if HTTP packet with the specificHttpHeadershould be encoded using this ContentEncoding.
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LZMAContentEncoding
public LZMAContentEncoding()
-
LZMAContentEncoding
public LZMAContentEncoding(EncodingFilter encodingFilter)
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:ContentEncodingGet the ContentEncoding name.- Specified by:
getNamein interfaceContentEncoding- Returns:
- the ContentEncoding name.
-
getAliases
public String[] getAliases()
Description copied from interface:ContentEncodingGet the ContentEncoding aliases.- Specified by:
getAliasesin interfaceContentEncoding- Returns:
- the ContentEncoding aliases.
-
getLzmaAliases
public static String[] getLzmaAliases()
-
wantDecode
public boolean wantDecode(HttpHeader header)
Description copied from interface:ContentEncodingMethod should implement the logic, which decides if HTTP packet with the specificHttpHeadershould be decoded using this ContentEncoding.- Specified by:
wantDecodein interfaceContentEncoding- Parameters:
header- HTTP packet header.- Returns:
- true, if this ContentEncoding should be used to decode the HTTP packet, or false otherwise.
-
wantEncode
public boolean wantEncode(HttpHeader header)
Description copied from interface:ContentEncodingMethod should implement the logic, which decides if HTTP packet with the specificHttpHeadershould be encoded using this ContentEncoding.- Specified by:
wantEncodein interfaceContentEncoding- Parameters:
header- HTTP packet header.- Returns:
- true, if this ContentEncoding should be used to encode the HTTP packet, or false otherwise.
-
decode
public ParsingResult decode(org.glassfish.grizzly.Connection connection, HttpContent httpContent)
Description copied from interface:ContentEncodingDecode HTTP packet content represented byHttpContent.- Specified by:
decodein interfaceContentEncoding- Parameters:
connection-Connection.httpContent-HttpContentto decode.- Returns:
ParsingResult, which represents the result of decoding.
-
encode
public HttpContent encode(org.glassfish.grizzly.Connection connection, HttpContent httpContent)
Description copied from interface:ContentEncodingEncode HTTP packet content represented byHttpContent.- Specified by:
encodein interfaceContentEncoding- Parameters:
connection-Connection.httpContent-HttpContentto encode.- Returns:
- encoded
HttpContent.
-
-