Encoders

The {@link oajr.annotation.RestResource#encoders @RestResource(encoders)} annotation can be used to associate character encoders with a servlet class.
Encoders can be used to enable various kinds of compression (e.g. "gzip") on requests and responses based on the request Accept-Encoding and Content-Encoding headers.

##### Example:

// Servlet with automated support for GZIP compression @RestResource(encoders={GzipEncoder.class}) public MyRestServlet extends BasicRestServlet { ... }

Juneau defines the following encoders out-of-the-box:

- {@link oaj.encoders.Encoder}
  - {@link oaj.encoders.GzipEncoder}
  - {@link oaj.encoders.IdentityEncoder}

##### See Also:

- {@link oajr.RestContext#REST_encoders}