Class URIUtils


  • public final class URIUtils
    extends java.lang.Object
    The URIUtils provides helper methods around working with URIs.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String relativize​(RequestPathInfo requestPathInfo, java.lang.String resourcePath)
      Relativizes the specified resourcePath against requestPathInfo.
      static java.lang.String urlEncodePath​(java.lang.String toEncode)
      URL encodes a path, ensuring that any forward slashes remain unencoded.
      • Methods inherited from class java.lang.Object

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

      • urlEncodePath

        public static java.lang.String urlEncodePath​(java.lang.String toEncode)
        URL encodes a path, ensuring that any forward slashes remain unencoded.
        Parameters:
        toEncode - The path to be safely URL encoded.
        Returns:
        A URL-encoded version of the path.
      • relativize

        public static java.lang.String relativize​(RequestPathInfo requestPathInfo,
                                                  java.lang.String resourcePath)
        Relativizes the specified resourcePath against requestPathInfo.

        Parameters:
        requestPathInfo - RequestPathInfo to relativize against
        resourcePath - Resource path to relativize
        Returns:
        The resulting path