public final class CharsetNegotiator
extends java.lang.Object
Constructor and Description |
---|
CharsetNegotiator(scala.collection.Seq<HttpHeader> requestHeaders) |
Modifier and Type | Method and Description |
---|---|
scala.collection.immutable.List<HttpCharsetRange> |
acceptedCharsetRanges()
The charset-ranges accepted by the client according to given request headers, sorted by
1.
|
boolean |
isAccepted(HttpCharset charset)
Determines whether the given charset is accepted by the client.
|
scala.Option<HttpCharset> |
pickBest()
Picks the charset that is most preferred by the client with a bias towards UTF-8,
i.e.
|
float |
qValueFor(HttpCharset charset)
Returns the q-value that the client (implicitly or explicitly) attaches to the given charset.
|
public CharsetNegotiator(scala.collection.Seq<HttpHeader> requestHeaders)
public scala.collection.immutable.List<HttpCharsetRange> acceptedCharsetRanges()
Accept-Charset
header(s)public boolean isAccepted(HttpCharset charset)
charset
- (undocumented)public scala.Option<HttpCharset> pickBest()
None
.
See also: http://tools.ietf.org/html/rfc7231#section-5.3.3
public float qValueFor(HttpCharset charset)
charset
- (undocumented)