Interface BasicHeaderValue

All Superinterfaces:
HeaderValue
All Known Subinterfaces:
BasicHeaderValueWithCharset, ContentType
All Known Implementing Classes:
BasicHeaderValueImpl, ContentTypes, ContentTypes.Text

public interface BasicHeaderValue extends HeaderValue
PARSER can parse a header-value of the following format:
value, value, ...; paramKey=paramValue; ...
 
See Also:
  • Field Details

  • Method Details

    • getValues

      @NotNull @NotNull List<@NotNull String> getValues()
      get the values of this header-value. Changing this List also changes this BasicHeaderValue.
      Returns:
      list of string values
    • getParameters

      @NotNull @NotNull Map<@NotNull String,@NotNull String> getParameters()
      get the parameters of this header-value. Changing this Map also changes this BasicHeaderValue.
      Returns:
      map of parameters
    • get

      @Nullable default @Nullable String get(@NotNull @NotNull String name)
      Get parameter with given name.
      Parameters:
      name - parameter name
      Returns:
      parameter or null, if no parameter with given key exists.
    • set

      @NotNull default @NotNull BasicHeaderValue set(@NotNull @NotNull String name, @Nullable @Nullable String value)
      Set parameter with given name to given value
      Parameters:
      name - parameter name
      value - parameter value or null to remove this parameter
    • add

      @NotNull default @NotNull BasicHeaderValue add(@NotNull @NotNull String value)
      See Also:
    • add

      @NotNull default @NotNull BasicHeaderValue add(@NotNull @NotNull String value, boolean check)
      Adds given value to this header-values value list.
      Parameters:
      value - value to add
      check - true: Only adds given value if it is not already in the value list false: Does not check if value is already in the value list
    • remove

      @NotNull default @NotNull BasicHeaderValue remove(@NotNull @NotNull String value)
      Removes given value to this header-values value list.
      Parameters:
      value - value to remove
    • contains

      default boolean contains(@NotNull @NotNull String value)
      Check if given value is contained in getValues().
      Parameters:
      value - value to check existence of
      Returns:
      true if given value is contained in getValues()