Class HttpField

java.lang.Object
org.eclipse.jetty.http.HttpField
Direct Known Subclasses:
HostPortHttpField, HttpCookie.SetCookieHttpField, HttpField.IntValueHttpField, HttpField.LongValueHttpField, PreEncodedHttpField, StaticTableHttpField, StaticTableHttpField

public class HttpField extends Object
An HTTP Field
  • Constructor Details

  • Method Details

    • getValueParameters

      public static String getValueParameters(String value, Map<String,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 String stripParameters(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 String valueParameters(String value, Map<String,String> parameters)
    • contains

      public boolean contains(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(Object o)
      Overrides:
      equals in class Object
    • getHeader

      public HttpHeader getHeader()
    • getIntValue

      public int getIntValue()
    • getLongValue

      public long getLongValue()
    • getLowerCaseName

      public String getLowerCaseName()
    • getName

      public String getName()
    • getValue

      public String getValue()
    • getValues

      public String[] getValues()
    • hashCode

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

      public boolean isSameName(HttpField field)
    • is

      public boolean is(String name)
    • toString

      public String toString()
      Overrides:
      toString in class Object