Class 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 Detail

    • Method Detail

      • getAcceptHeader

        public String getAcceptHeader()
        Builds and returns an accept header.
        Returns:
        the accept header.