Class ContentEncodingRegistry


  • public class ContentEncodingRegistry
    extends java.lang.Object
    Keeps track of available content-encoding handlers.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.util.Map<java.lang.String,​ContentEncoding> getDefaultEncoders()
      This implementation adds a GZIPEncoding and DeflateEncoding handler to the registry.
      (package private) void setInterceptors​(org.apache.http.impl.client.AbstractHttpClient client, java.lang.Object... encodings)
      Add the request and response interceptors to the HttpClient, which will provide transparent decoding of the given content-encoding types.
      • Methods inherited from class java.lang.Object

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

      • availableEncoders

        protected java.util.Map<java.lang.String,​ContentEncoding> availableEncoders
    • Constructor Detail

      • ContentEncodingRegistry

        public ContentEncodingRegistry()
    • Method Detail

      • getDefaultEncoders

        protected java.util.Map<java.lang.String,​ContentEncoding> getDefaultEncoders()
        This implementation adds a GZIPEncoding and DeflateEncoding handler to the registry. Override this method to provide a different set of defaults.
        Returns:
        a map to content-encoding strings to ContentEncoding handlers.
      • setInterceptors

        void setInterceptors​(org.apache.http.impl.client.AbstractHttpClient client,
                             java.lang.Object... encodings)
        Add the request and response interceptors to the HttpClient, which will provide transparent decoding of the given content-encoding types. This method is called by HTTPBuilder and probably should not need be modified by sub-classes.
        Parameters:
        client - client on which to set the request and response interceptors
        encodings - encoding name (either a ContentEncoding.Type or a content-encoding string.