Class Syntax


  • @Deprecated(since="2021-05-27")
    public final class Syntax
    extends java.lang.Object
    Deprecated.
    The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
    Collection of Syntax validation methods.

    Use in a similar way as you would Objects.requireNonNull(Object)

    • Constructor Summary

      Constructors 
      Constructor Description
      Syntax()
      Deprecated.
       
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static void requireValidRFC2616Token​(java.lang.String value, java.lang.String msg)
      Deprecated.
      Per RFC2616: Section 2.2, a token follows these syntax rules
      static void requireValidRFC6265CookieValue​(java.lang.String value)
      Deprecated.
      Per RFC6265, Cookie.value follows these syntax rules
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Syntax

        public Syntax()
        Deprecated.
    • Method Detail

      • requireValidRFC2616Token

        public static void requireValidRFC2616Token​(java.lang.String value,
                                                    java.lang.String msg)
        Deprecated.
        Per RFC2616: Section 2.2, a token follows these syntax rules
          token          = 1*<any CHAR except CTLs or separators>
          CHAR           = <any US-ASCII character (octets 0 - 127)>
          CTL            = <any US-ASCII control character
                           (octets 0 - 31) and DEL (127)>
          separators     = "(" | ")" | "<" | ">" | "@"
                         | "," | ";" | ":" | "\" | <">
                         | "/" | "[" | "]" | "?" | "="
                         | "{" | "}" | SP | HT
         
        Parameters:
        value - the value to test
        msg - the message to be prefixed if an IllegalArgumentException is thrown.
        Throws:
        java.lang.IllegalArgumentException - if the value is invalid per spec
      • requireValidRFC6265CookieValue

        public static void requireValidRFC6265CookieValue​(java.lang.String value)
        Deprecated.
        Per RFC6265, Cookie.value follows these syntax rules
          cookie-value      = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )
          cookie-octet      = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
                              ; US-ASCII characters excluding CTLs,
                              ; whitespace DQUOTE, comma, semicolon,
                              ; and backslash
         
        Parameters:
        value - the value to test
        Throws:
        java.lang.IllegalArgumentException - if the value is invalid per spec