Package org.jboss.resteasy.core.request
Class AcceptHeaders
java.lang.Object
org.jboss.resteasy.core.request.AcceptHeaders
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static QualityValue
evaluateAcceptParameters
(Map<String, String> parameters) Evaluates and removes the accept parameters.static Map<Locale,
QualityValue> getLocaleQualityValues
(String header) Gets the locales from a comma-separated list.static Map<javax.ws.rs.core.MediaType,
QualityValue> getMediaTypeQualityValues
(String header) Gets the media types from a comma-separated list.static Map<String,
QualityValue> getStringQualityValues
(String header) Gets the strings from a comma-separated list.private static int
parseParameters
(Map<String, String> parameters, String header, int offset)
-
Constructor Details
-
AcceptHeaders
public AcceptHeaders()
-
-
Method Details
-
getStringQualityValues
Gets the strings from a comma-separated list. All "*" entries are replaced withnull
keys.- Parameters:
header
- the header value.- Returns:
- the listed items in order of appearance or
null
if the header didn't contain any entries.
-
getLocaleQualityValues
Gets the locales from a comma-separated list. Any "*" entries are replaced withnull
keys.- Parameters:
header
- the header value.- Returns:
- the listed items in order of appearance or
null
if the header didn't contain any entries.
-
getMediaTypeQualityValues
Gets the media types from a comma-separated list.- Parameters:
header
- the header value.- Returns:
- the listed items in order of appearance or
null
if the header didn't contain any entries.
-
parseParameters
-
evaluateAcceptParameters
Evaluates and removes the accept parameters.accept-params = ";" "q" "=" qvalue *( accept-extension ) accept-extension = ";" token [ "=" ( token | quoted-string ) ]
- Parameters:
parameters
- all parameters in order of appearance.- Returns:
- the qvalue.
-