Class Uri


  • public class Uri
    extends Object
    • Constructor Detail

      • Uri

        public Uri​(String scheme,
                   @Nullable
                   @Nullable String userInfo,
                   String host,
                   int port,
                   String path,
                   @Nullable
                   @Nullable String query,
                   @Nullable
                   @Nullable String fragment)
    • Method Detail

      • create

        public static Uri create​(String originalUrl)
      • create

        public static Uri create​(@Nullable
                                 @Nullable Uri context,
                                 String originalUrl)
      • getQuery

        @Nullable
        public @Nullable String getQuery()
      • getPath

        public String getPath()
      • getUserInfo

        @Nullable
        public @Nullable String getUserInfo()
      • getPort

        public int getPort()
      • getScheme

        public String getScheme()
      • getHost

        public String getHost()
      • getFragment

        @Nullable
        public @Nullable String getFragment()
      • isSecured

        public boolean isSecured()
      • isWebSocket

        public boolean isWebSocket()
      • getExplicitPort

        public int getExplicitPort()
      • getSchemeDefaultPort

        public int getSchemeDefaultPort()
      • toUrl

        public String toUrl()
      • toBaseUrl

        public String toBaseUrl()
        Returns:
        [scheme]://[hostname](:[port])/path. Port is omitted if it matches the scheme's default one.
      • toRelativeUrl

        public String toRelativeUrl()
      • toFullUrl

        public String toFullUrl()
      • getBaseUrl

        public String getBaseUrl()
      • getAuthority

        public String getAuthority()
      • isSameBase

        public boolean isSameBase​(Uri other)
      • getNonEmptyPath

        public String getNonEmptyPath()
      • withNewScheme

        public Uri withNewScheme​(String newScheme)
      • withNewQuery

        public Uri withNewQuery​(@Nullable
                                @Nullable String newQuery)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • validateSupportedScheme

        public static void validateSupportedScheme​(Uri uri)