Class ParameterizedHeader


  • public class ParameterizedHeader
    extends Object
    A general parameterized header.

    The header consists of a value and zero or more parameters. A value consists of zero or more tokens and separators up to but not including a ';' separator if present. The tokens and separators of a value may be separated by zero or more white space, which is ignored and is not considered part of the value. The value is separated from the parameters with a ';'. Each parameter is separated with a ';'.

    Author:
    Paul Sandoz, Marek Potociar
    • Constructor Detail

      • ParameterizedHeader

        public ParameterizedHeader​(String header)
                            throws ParseException
        Create a parameterized header from given string value.
        Parameters:
        header - header to create parameterized header from.
        Throws:
        ParseException - if an un-expected/in-correct value is found during parsing the header.
      • ParameterizedHeader

        public ParameterizedHeader​(HttpHeaderReader reader)
                            throws ParseException
        Create a parameterized header from given http header reader.
        Parameters:
        reader - reader to initialize new parameterized header from.
        Throws:
        ParseException - if an un-expected/in-correct value is found during parsing the header.
    • Method Detail

      • getValue

        public String getValue()
        Get the value.
        Returns:
        the value.
      • getParameters

        public Map<String,​String> getParameters()
        Get the parameters.
        Returns:
        the parameters