Class ContentEncoder

All Implemented Interfaces:
ReaderInterceptor, WriterInterceptor
Direct Known Subclasses:
DeflateEncoder, GZipEncoder

@Priority(4000) @Contract public abstract class ContentEncoder extends Object implements ReaderInterceptor, WriterInterceptor
Standard contract for plugging in content encoding support. Provides a standard way of implementing encoding WriterInterceptor and decoding ReaderInterceptor. Implementing this class ensures the encoding supported by the implementation will be considered during the content negotiation phase when deciding which encoding should be used based on the accepted encodings (and the associated quality parameters) in the request headers.
Martin Matula
  • Constructor Details

    • ContentEncoder

      protected ContentEncoder(String... supportedEncodings)
      Initializes this encoder implementation with the list of supported content encodings.
      supportedEncodings - Values of Content-Encoding header supported by this encoding provider.
  • Method Details