Package org.apache.any23.http
Class AcceptHeaderBuilder
- java.lang.Object
- 
- org.apache.any23.http.AcceptHeaderBuilder
 
- 
 public class AcceptHeaderBuilder extends Object Concatenates a collection of MIME specs in "type/subtype;q=x.x" notation into an HTTP Accept header value, and removes duplicates and types covered by wildcards. For example, if the type list contains "text/*;q=0.5", then "text/plain;q=0.1" in the list will be ignored because it's already covered by the wildcard with a higher q value.- Author:
- Richard Cyganiak (richard@cyganiak.de)
 
- 
- 
Constructor SummaryConstructors Constructor Description AcceptHeaderBuilder(Collection<MIMEType> mimeTypes)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AcceptHeaderBuilderfromStrings(Collection<String> typesAsStrings)StringgetAcceptHeader()Builds and returns an accept header.
 
- 
- 
- 
Constructor Detail- 
AcceptHeaderBuilderpublic AcceptHeaderBuilder(Collection<MIMEType> mimeTypes) 
 
- 
 - 
Method Detail- 
fromStringspublic static AcceptHeaderBuilder fromStrings(Collection<String> typesAsStrings) 
 - 
getAcceptHeaderpublic String getAcceptHeader() Builds and returns an accept header.- Returns:
- the accept header.
 
 
- 
 
-