Class HttpField

    • Constructor Detail

      • HttpField

        public HttpField​(HttpHeader header,
                         java.lang.String name,
                         java.lang.String value)
      • HttpField

        public HttpField​(HttpHeader header,
                         java.lang.String value)
      • HttpField

        public HttpField​(java.lang.String name,
                         java.lang.String value)
    • Method Detail

      • getValueParameters

        public static java.lang.String getValueParameters​(java.lang.String value,
                                                          java.util.Map<java.lang.String,​java.lang.String> parameters)
        Get field value parameters. Some field values can have parameters. This method separates the value from the parameters and optionally populates a map with the parameters. For example:
        
         FieldName : Value ; param1=val1 ; param2=val2
        
         
        Parameters:
        value - The Field value, possibly with parameters.
        parameters - A map to populate with the parameters, or null
        Returns:
        The value.
      • stripParameters

        public static java.lang.String stripParameters​(java.lang.String value)
        Get field value without parameters. Some field values can have parameters. This method separates the value from the parameters and optionally populates a map with the parameters. For example:
        
         FieldName : Value ; param1=val1 ; param2=val2
        
         
        Parameters:
        value - The Field value, possibly with parameters.
        Returns:
        The value.
      • valueParameters

        public static java.lang.String valueParameters​(java.lang.String value,
                                                       java.util.Map<java.lang.String,​java.lang.String> parameters)
      • contains

        public boolean contains​(java.lang.String search)
        Look for a value in a possible multi valued field
        Parameters:
        search - Values to search for (case insensitive)
        Returns:
        True iff the value is contained in the field value entirely or as an element of a quoted comma separated list. List element parameters (eg qualities) are ignored, except if they are q=0, in which case the item itself is ignored.
      • equals

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

        public int getIntValue()
      • getLongValue

        public long getLongValue()
      • getLowerCaseName

        public java.lang.String getLowerCaseName()
      • getName

        public java.lang.String getName()
      • getValue

        public java.lang.String getValue()
      • getValues

        public java.lang.String[] getValues()
      • hashCode

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

        public boolean isSameName​(HttpField field)
      • is

        public boolean is​(java.lang.String name)
      • toString

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