Class UriTemplate


  • public class UriTemplate
    extends Template
    URI Template, as defined by RFC 6570, supporting Level 1 expressions, with the following differences:
    1. unresolved variables are preserved as literals
    2. all literals are pct-encoded
    • Method Detail

      • create

        public static UriTemplate create​(java.lang.String template,
                                         java.nio.charset.Charset charset)
        Create a Uri Template.
        Parameters:
        template - representing the uri.
        charset - for encoding.
        Returns:
        a new Uri Template instance.
      • create

        public static UriTemplate create​(java.lang.String template,
                                         boolean encodeSlash,
                                         java.nio.charset.Charset charset)
        Create a Uri Template.
        Parameters:
        template - representing the uri
        encodeSlash - flag if slash characters should be encoded.
        charset - for the template.
        Returns:
        a new Uri Template instance.
      • append

        public static UriTemplate append​(UriTemplate uriTemplate,
                                         java.lang.String fragment)
        Append a uri fragment to the template.
        Parameters:
        uriTemplate - to append to.
        fragment - to append.
        Returns:
        a new UriTemplate with the fragment appended.