public final class EncoderGroup extends Object
encoders
keyed by codings.
The getEncoderMatch(String)
and getEncoder(String)
methods are then used to find appropriate
encoders for specific
Adding new entries will cause the entries to be prepended to the group. This allows for previous encoders to be overridden through subsequent calls.
For example, calling groupBuilder.append(E1.
will result in the order
Modifier and Type | Field and Description |
---|---|
static EncoderGroup |
DEFAULT
A default encoder group consisting of identity and G-Zip encoding.
|
Constructor and Description |
---|
EncoderGroup(Encoder[] encoders)
Constructor
|
Modifier and Type | Method and Description |
---|---|
EncoderGroupBuilder |
builder()
Returns a builder that's a copy of the settings on this encoder group.
|
static EncoderGroupBuilder |
create()
Instantiates a new clean-slate
EncoderGroupBuilder object. |
Encoder |
getEncoder(String encoding)
Returns the encoder registered with the specified coding (e.g.
|
EncoderMatch |
getEncoderMatch(String acceptEncoding)
Returns the coding string for the matching encoder that can handle the specified
|
List<Encoder> |
getEncoders()
Returns the encoders in this group.
|
List<String> |
getSupportedEncodings()
Returns the set of codings supported by all encoders in this group.
|
public static final EncoderGroup DEFAULT
public EncoderGroup(Encoder[] encoders)
encoders
- The encoders to add to this group.public static EncoderGroupBuilder create()
EncoderGroupBuilder
object.
This is equivalent to simply calling
.
EncoderGroupBuilder
object.public EncoderGroupBuilder builder()
EncoderGroupBuilder
initialized to this group.public EncoderMatch getEncoderMatch(String acceptEncoding)
Returns
This method is fully compliant with the RFC2616/14.3 and 14.11 specifications.
acceptEncoding
- The public Encoder getEncoder(String encoding)
encoding
- The coding string.public List<String> getSupportedEncodings()
public List<Encoder> getEncoders()
Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.