Class AcceptLanguage
java.lang.Object
org.apache.tomcat.util.http.parser.AcceptLanguage
Represents a single language entry from an Accept-Language header.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAcceptLanguage(Locale locale, double quality) Constructs a new AcceptLanguage. -
Method Summary
Modifier and TypeMethodDescriptionReturns the locale.doubleReturns the quality value.static List<AcceptLanguage> parse(StringReader input) Parses an Accept-Language header value.
-
Constructor Details
-
AcceptLanguage
Constructs a new AcceptLanguage.- Parameters:
locale- The locale of this language entryquality- The quality value for this language entry
-
-
Method Details
-
getLocale
-
getQuality
public double getQuality()Returns the quality value.- Returns:
- The quality value of this language entry
-
parse
Parses an Accept-Language header value.- Parameters:
input- The StringReader containing the header value- Returns:
- A list of AcceptLanguage entries sorted by quality
- Throws:
IOException- If an I/O error occurs while reading the input
-