UriUtil
@UnstableApi
public final class UriUtil
Utility methods for manipulating URIs.
Summary
Public methods |
|
|---|---|
static String |
@UnstableApiCalculates the relative path from a base URI to a target URI. |
static boolean |
isAbsolute(@Nullable String uri)Returns true if the URI is starting with a scheme component, false otherwise. |
static Uri |
removeQueryParameter(Uri uri, String queryParameterName)Removes query parameter from a URI, if present. |
static String |
Performs relative resolution of a |
static Uri |
resolveToUri(@Nullable String baseUri, @Nullable String referenceUri) |
Public methods
getRelativePath
@UnstableApi
public static String getRelativePath(Uri baseUri, Uri targetUri)
Calculates the relative path from a base URI to a target URI.
| Returns | |
|---|---|
String |
The relative path from the base URI to the target URI, or |
isAbsolute
public static boolean isAbsolute(@Nullable String uri)
Returns true if the URI is starting with a scheme component, false otherwise.
removeQueryParameter
public static Uri removeQueryParameter(Uri uri, String queryParameterName)
Removes query parameter from a URI, if present.
| Returns | |
|---|---|
Uri |
The URI without the query parameter. |