Class UriUtil


  • @Internal
    public class UriUtil
    extends java.lang.Object
    Utilities related to URIs.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getPathNormalized​(java.net.URI uri)
      Get normalized path from URI, which: is not null doesn't start or end with slash
      static java.util.List<java.lang.String> parsePath​(java.net.URI uri)
      Parse path from URI
      static java.util.Map<java.lang.String,​java.lang.String> parseQuery​(java.net.URI uri)
      Parse query string from URI
      • Methods inherited from class java.lang.Object

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

      • parseQuery

        public static java.util.Map<java.lang.String,​java.lang.String> parseQuery​(java.net.URI uri)
        Parse query string from URI
        Parameters:
        uri - uri for parsing
        Returns:
        Map of query params
      • getPathNormalized

        public static java.lang.String getPathNormalized​(java.net.URI uri)
        Get normalized path from URI, which:
        • is not null
        • doesn't start or end with slash
        Parameters:
        uri - the URI to extract path from
        Returns:
        normalized path
      • parsePath

        public static java.util.List<java.lang.String> parsePath​(java.net.URI uri)
        Parse path from URI
        Parameters:
        uri - uri for parsing
        Returns:
        list of paths as string