Class HttpFields.Immutable

  • All Implemented Interfaces:
    java.lang.Iterable<HttpField>, HttpFields
    Enclosing interface:
    HttpFields

    public static class HttpFields.Immutable
    extends java.lang.Object
    implements HttpFields
    HTTP Fields. A collection of HTTP header and or Trailer fields.

    This class is not synchronized as it is expected that modifications will only be performed by a single thread.

    The cookie handling provided by this class is guided by the Servlet specification and RFC6265.

    • Constructor Detail

      • Immutable

        public Immutable​(HttpField[] fields)
        Initialize HttpFields from copy.
        Parameters:
        fields - the fields to copy data from
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • get

        public java.lang.String get​(java.lang.String header)
        Specified by:
        get in interface HttpFields
      • getField

        public HttpField getField​(int index)
        Description copied from interface: HttpFields
        Get a Field by index.
        Specified by:
        getField in interface HttpFields
        Parameters:
        index - the field index
        Returns:
        A Field value or null if the Field value has not been set
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • iterator

        public java.util.Iterator<HttpField> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<HttpField>
      • size

        public int size()
        Specified by:
        size in interface HttpFields
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object