Class Header

    • Constructor Detail

      • Header

        public Header()
    • Method Detail

      • getName

        public abstract String getName()
        Returns the name of the header, as it would canonically appear within an HTTP message.
        Returns:
        The name of the header, as it would canonically appear within an HTTP message.
      • getValues

        public abstract List<String> getValues()
        Returns the header as a list of strings. If the header has no values then it must return an empty list, never null. Each String should represent the value component of the key-value pair that makes up the HTTP header - as such, for some Header implementations each String in this List may contain multiple token-separated values.

        The List returned from this method should not be expected to be mutable. However, some subclasses of Header may choose to implement it as such.

        Returns:
        The header as a non-null list of string values. Can be an empty list.
      • getFirstValue

        public String getFirstValue()
        Gets the first value of this header instance. As with getValues(), the returned String may contain multiple token-separated values.
        Returns:
        The first value, or null if none exist.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object