Class HeaderHelper

java.lang.Object
org.jboss.resteasy.util.HeaderHelper

public class HeaderHelper extends Object
Version:
$Revision: 1 $
Author:
Bill Burke
  • Constructor Details

    • HeaderHelper

      public HeaderHelper()
  • Method Details

    • containsHeaderString

      public static boolean containsHeaderString(String value, String valueSeparatorRegex, Predicate<String> valuePredicate)
      Checks if the value of a header contains an entry separated by the valueSeparatorRegex parameter. If the parameter is null, a "," separator is used.
      Parameters:
      value - the header value to check, if null false will be returned
      valueSeparatorRegex - the regex value used to parse the header string value into parts, if null a comma is used
      valuePredicate - the predicate used to check the values, cannot be null
      Returns:
      true if the header value exists and the predicate matches the whitespace-trimmed value.
      See Also:
      • HttpHeaders.containsHeaderString(String, String, Predicate)
    • setAllow

      public static void setAllow(jakarta.ws.rs.core.MultivaluedMap<String,Object> headers, String[] methods)
    • setAllow

      public static void setAllow(jakarta.ws.rs.core.MultivaluedMap<String,Object> headers, Set<String> methods)