Interface ParsedHeaderValues
public interface ParsedHeaderValues
A container with the request's headers that are meaningful enough to be parsed
Contains:
- Accept -> MIME header, parameters and sortable
- Accept-Charset -> Parameters and sortable
- Accept-Encoding -> Parameters and sortable
- Accept-Language -> Parameters and sortable
- Content-Type -> MIME header and parameters
-
Method Summary
Modifier and TypeMethodDescriptionaccept()findBestUserAcceptedIn(List<MIMEHeader> accepted, Collection<MIMEHeader> in) Given the sorted list of parsed header values the user has sent and an Iterable of acceptable values: It finds the first accepted header that matches any inside the Iterable.
-
Method Details
-
accept
List<MIMEHeader> accept()- Returns:
- List of MIME values in the
Acceptheader
-
acceptCharset
List<ParsedHeaderValue> acceptCharset()- Returns:
- List of charset values in the
Accept-Charsetheader
-
acceptEncoding
List<ParsedHeaderValue> acceptEncoding()- Returns:
- List of encofing values in the
Accept-Encodingheader
-
acceptLanguage
List<LanguageHeader> acceptLanguage()- Returns:
- List of languages in the
Accept-Languageheader
-
contentType
MIMEHeader contentType()- Returns:
- MIME value in the
Content-Typeheader
-
findBestUserAcceptedIn
Given the sorted list of parsed header values the user has sent and an Iterable of acceptable values: It finds the first accepted header that matches any inside the Iterable.Note: This method is intended for internal usage.
- Parameters:
accepted- The sorted list of headers to find the best one.in- The headers to match against.- Returns:
- The first header that matched, otherwise empty if none matched
-