Class Slug


  • public class Slug
    extends Object
    A class representing an HTTP Slug header.

    Any trailing hashURI values (#foo) are removed as are any query parameters (?bar). Spaces and slashes are converted to underscores.

    See Also:
    RFC 5023
    • Constructor Detail

      • Slug

        public Slug​(String value)
        Create a new Slug object.
        Parameters:
        value - the value of the Slug header.
    • Method Detail

      • getValue

        public String getValue()
        Get the value of the Slug header.
        Returns:
        the slug value.
      • valueOf

        public static Slug valueOf​(String value)
        Get a Slug object from a decoded string value.
        Parameters:
        value - the raw value of the HTTP header, may be null
        Returns:
        a Slug object with a decoded value or null