public class EncodingRegistry
extends java.lang.Object
Constructor and Description |
---|
EncodingRegistry()
Constructs the
EncodingRegistry with IdentityContentEncoding , IdentityTransferEncoding
and ChunkedTransferCodingHandler registered. |
Modifier and Type | Method and Description |
---|---|
ContentEncoding |
getAcceptEncodingHandler(java.lang.String encoding)
Returns the most suitable
ContentEncoding to match the encodings described in
Accept-Encoding header. |
TransferEncoding |
getChunkedTransferEncoding()
Return the
ContentEncoding corresponding to chunked transfer coding. |
ContentEncoding |
getContentEncoding(java.lang.String encoding)
Return the
ContentEncoding corresponding to the given encoding. |
TransferEncoding |
getIdentityTransferCodingHandler()
Return the
ContentEncoding corresponding to identity transfer coding (i.e. |
TransferEncoding |
getTransferEncoding(java.lang.String encoding)
Return the
TransferEncoding corresponding to the given encoding. |
void |
registerContentEncoding(ContentEncoding handler)
Registers a new HTTP content encoding handler.
|
void |
registerTransferEncoding(TransferEncoding handler)
Registers a new HTTP transfer coding handler.
|
public EncodingRegistry()
EncodingRegistry
with IdentityContentEncoding
, IdentityTransferEncoding
and ChunkedTransferCodingHandler
registered.public TransferEncoding getIdentityTransferCodingHandler()
ContentEncoding
corresponding to identity transfer coding (i.e. no transfer coding).ContentEncoding
corresponding to identity transfer coding (i.e. no transfer coding)public TransferEncoding getChunkedTransferEncoding()
ContentEncoding
corresponding to chunked transfer coding.ContentEncoding
corresponding to chunked transfer coding.public ContentEncoding getContentEncoding(java.lang.String encoding)
ContentEncoding
corresponding to the given encoding.encoding
- case insensitive (See RFC2616, 3.5).public TransferEncoding getTransferEncoding(java.lang.String encoding)
TransferEncoding
corresponding to the given encoding.encoding
- case insensitive (See RFC2616, 3.5).public void registerContentEncoding(ContentEncoding handler)
handler
- the ContentEncoding
to register.public void registerTransferEncoding(TransferEncoding handler)
handler
- the TransferEncoding
to register.public ContentEncoding getAcceptEncodingHandler(java.lang.String encoding)
ContentEncoding
to match the encodings described in
Accept-Encoding
header.encoding
- is on the form gzip, identity
or gzip; q=0.8, identity; q=0.2
.ContentEncoding
, or null
if no suitable handler can be found.