public class Uri extends Object
Character encoding is employed as defined by RFC 3986, see RFC 3986 section 2.1, while multibyte unicode characters are preserved in encoded parts.
1 [scheme:]scheme-specific-part[#fragment] 2 [scheme:][//authority]path[?query][#fragment] 3 [scheme:][//[user-info@]host[:port]]path[?query][#fragment] scheme-specific-part: [//authority]path[?query] authority: [user-info@]host[:port]
RFC 3986 section 2.2 Reserved Characters (January 2005)
! |
* |
' |
( |
) |
; |
: |
@ |
& |
= |
+ |
$ |
, |
/ |
? |
# |
[ |
] |
RFC 3986 section 2.3 Unreserved Characters (January 2005)
A |
B |
C |
D |
E |
F |
G |
H |
I |
J |
K |
L |
M |
N |
O |
P |
Q |
R |
S |
T |
U |
V |
W |
X |
Y |
Z |
a |
b |
c |
d |
e |
f |
g |
h |
i |
j |
k |
l |
m |
n |
o |
p |
q |
r |
s |
t |
u |
v |
w |
x |
y |
z |
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
- |
_ |
. |
~ |
Other characters in a Uri must be percent encoded.
Modifier and Type | Class and Description |
---|---|
static class |
Uri.ASCIIEncoded |
static class |
Uri.Encoded
Immutable RFC3986 encoded string.
|
Modifier and Type | Field and Description |
---|---|
boolean |
absolute
Indicating whether this Uri is absolute, i.e.
|
Uri.Encoded |
authority
Encoded
authority part of scheme-specific-part , null if undefined. |
static String |
AUTHORITY_LEGAL
Valid charset for RFC 2396
authority ,
additional to legal alphanum characters. |
static String |
FILE_SCHEME
"file"
|
static String |
FRAG_LEGAL
Valid charset for RFC 2396
fragment ,
additional to legal alphanum characters. |
Uri.Encoded |
fragment
Encoded
fragment , null if undefined. |
static char |
FRAGMENT_SEPARATOR
35
|
boolean |
hasAuthority
Indicating whether
authority part is defined or not. |
Uri.Encoded |
host
Encoded
host part of authority and scheme-specific-part , null if undefined. |
static String |
HTTP_SCHEME
"http"
|
static String |
HTTPS_SCHEME
"https"
|
Uri.Encoded |
input
Encoded input string used at construction, never
null . |
static String |
JAR_SCHEME
"jar"
|
static char |
JAR_SCHEME_SEPARATOR
A JAR sub-protocol is separated from the JAR entry w/ this separator 33.
|
boolean |
opaque
Indicating whether this Uri is opaque, i.e.
|
Uri.Encoded |
path
Encoded
path part of scheme-specific-part , never null . |
static String |
PATH_LEGAL
Valid charset for RFC 2396
path ,
additional to legal alphanum characters. |
int |
port
Encoded
port part of authority and scheme-specific-part , -1 if undefined. |
Uri.Encoded |
query
Encoded
query part of scheme-specific-part , null if undefined. |
static String |
QUERY_LEGAL
Valid charset for RFC 2396
query ,
additional to legal alphanum characters. |
static char |
QUERY_SEPARATOR
63
|
static String |
RESERVED
RFC 3986 section 2.2 Reserved Characters (January 2005)
|
static String |
RESERVED_2 |
Uri.Encoded |
scheme
Encoded
scheme , null if undefined. |
static char |
SCHEME_SEPARATOR
58
|
Uri.Encoded |
schemeSpecificPart
Encoded
scheme-specific-part , never null . |
static String |
SSP_LEGAL
Valid charset for RFC 2396
scheme-specific-part ,
additional to legal alphanum characters. |
static String |
UNRESERVED
RFC 3986 section 2.3 Unreserved Characters (January 2005)
|
Uri.Encoded |
userInfo
Encoded
userinfo part of authority and scheme-specific-part , null if undefined. |
static String |
USERINFO_LEGAL
Valid charset for RFC 2396
authority 's user-info ,
additional to legal alphanum characters. |
Constructor and Description |
---|
Uri(Uri.Encoded uri)
Creates a new Uri instance according to the given encoded string
uri . |
Modifier and Type | Method and Description |
---|---|
static Uri |
cast(String encodedUri)
Casts the given encoded String to a
new Encoded instance
used to create the resulting Uri instance via Uri(Encoded) . |
Uri |
concat(Uri.Encoded suffix)
Concatenates the given encoded string to the
encoded uri
of this instance and returns a new Uri instance with the result. |
static Uri |
create(String scheme,
String ssp,
String fragment)
Creates a new Uri instance using the given unencoded arguments.
|
static Uri |
create(String scheme,
String userinfo,
String host,
int port,
String path,
String query,
String fragment)
Creates a new Uri instance using the given unencoded arguments.
|
static Uri |
create(String scheme,
String host,
String path,
String fragment)
Creates a new Uri instance using the given unencoded arguments.
|
static Uri |
create(String scheme,
String authority,
String path,
String query,
String fragment)
Creates a new Uri instance using the given unencoded arguments.
|
static Uri |
create(Uri.Encoded scheme,
Uri.Encoded ssp,
Uri.Encoded fragment)
Creates a new Uri instance using the given encoded arguments.
|
static Uri |
create(Uri.Encoded scheme,
Uri.Encoded userinfo,
Uri.Encoded host,
int port,
Uri.Encoded path,
Uri.Encoded query,
Uri.Encoded fragment)
Creates a new Uri instance using the given encoded arguments.
|
static Uri |
create(Uri.Encoded scheme,
Uri.Encoded host,
Uri.Encoded path,
Uri.Encoded fragment)
Creates a new Uri instance using the given encoded arguments.
|
static Uri |
create(Uri.Encoded scheme,
Uri.Encoded authority,
Uri.Encoded path,
Uri.Encoded query,
Uri.Encoded fragment)
Creates a new Uri instance using the given encoded arguments.
|
static String |
decode(String encoded)
Decodes the string argument which is assumed to be encoded in the
x-www-form-urlencoded MIME content type using the UTF-8 encoding scheme. |
static String |
decode(Uri.Encoded encoded)
Safe
Uri.Encoded.decode() call on optional encoded instance. |
static String |
encode(String vanilla,
String legal)
All characters are encoded into their hexadecimal value prepended by '%', except:
letters ('a'..'z', 'A'..'Z')
numbers ('0'..'9')
characters in the legal-set parameter
others (unicode characters that are not in
US-ASCII set, and are not ISO Control or are not ISO Space characters)
|
static String |
encodeToASCIIString(String unicode)
Other characters, which are Unicode chars that are not US-ASCII, and are
not ISO Control or are not ISO Space chars are not preserved
and encoded into their hexidecimal value prepended by '%'.
|
boolean |
equals(Object o) |
Uri |
getContainedUri()
If this instance's
schemeSpecificPart contains a Uri itself, a sub-Uri,
return schemeSpecificPart + # fragment via it's own new Uri instance. |
Uri |
getDirectory()
Returns this Uri's directory Uri.
|
Uri.Encoded |
getEncoded()
Returns the encoded
input , never null . |
Uri |
getNewQuery(Uri.Encoded newQuery)
Returns a new Uri instance w/ the given new query
newQuery . |
Uri |
getNormalized()
|
Uri |
getParent()
Returns this Uri's parent directory Uri..
|
Uri |
getRelativeOf(Uri.Encoded appendPath)
Returns a new Uri appending the given
appendPath
to this instance's directory . |
int |
hashCode() |
boolean |
isFileScheme()
Returns true, if this instance is a
file scheme , otherwise false. |
Uri.ASCIIEncoded |
toASCIIString()
Returns the encoded
input encoded in US-ASCII. |
File |
toFile()
If this instance
is a file scheme ,
implementation decodes [ "//"+authority ] + path ,then it processes the result if File.separatorChar == '\\'
as follows:
slash -> backslash
drop a starting single backslash, preserving windows UNC
and returns the resulting new File instance. |
String |
toString()
|
URI |
toURI()
|
URI |
toURIReencoded()
Returns a new
URI instance based upon this instance. |
URL |
toURL()
|
static Uri |
valueOf(File file)
Creates a new Uri instance using the given File instance.
|
static Uri |
valueOf(URI uri)
Creates a new Uri instance using the given URI instance.
|
static Uri |
valueOf(URL url)
Creates a new Uri instance using the given URL instance,
convenient wrapper for
valueOf(URI) and URL#toURI() . |
static Uri |
valueOfFilepath(String path)
Creates a new Uri instance using the given file-path argument.
|
public static final String UNRESERVED
"_-.~" + alphanum
public static final String RESERVED
",;:$&+=!*\'()@/?#[]" + alphanum
public static final String RESERVED_2
public static final String USERINFO_LEGAL
authority
's user-info
,
additional to legal alphanum
characters.
"_-.~,;:$&+=" + alphanum
public static final String AUTHORITY_LEGAL
authority
,
additional to legal alphanum
characters.
"@[]_-.~,;:$&+=" + alphanum
public static final String PATH_LEGAL
path
,
additional to legal alphanum
characters.
"/!_-.~" + alphanum
public static final String QUERY_LEGAL
query
,
additional to legal alphanum
characters.
"_-.~,;:$&+=!*\'()@/?[]\\\"" + alphanum
public static final String SSP_LEGAL
scheme-specific-part
,
additional to legal alphanum
characters.
"_-.~,;:$&+=!*\'()@/?[]\\\"" + alphanum
public static final String FRAG_LEGAL
fragment
,
additional to legal alphanum
characters.
"_-.~,;:$&+=!*\'()@/?#[]" + alphanum
public static final char SCHEME_SEPARATOR
public static final char QUERY_SEPARATOR
public static final char FRAGMENT_SEPARATOR
public static final String FILE_SCHEME
public static final String HTTP_SCHEME
public static final String HTTPS_SCHEME
public static final String JAR_SCHEME
public static final char JAR_SCHEME_SEPARATOR
public final Uri.Encoded input
null
.public final Uri.Encoded scheme
scheme
, null
if undefined.public final Uri.Encoded schemeSpecificPart
scheme-specific-part
, never null
.public final Uri.Encoded path
path
part of scheme-specific-part
, never null
.public final boolean hasAuthority
authority
part is defined or not.public final Uri.Encoded authority
authority
part of scheme-specific-part
, null
if undefined.public final Uri.Encoded userInfo
userinfo
part of authority
and scheme-specific-part
, null
if undefined.public final Uri.Encoded host
host
part of authority
and scheme-specific-part
, null
if undefined.public final int port
port
part of authority
and scheme-specific-part
, -1
if undefined.public final Uri.Encoded query
query
part of scheme-specific-part
, null
if undefined.public final Uri.Encoded fragment
fragment
, null
if undefined.public final boolean absolute
scheme
and hence an absolute scheme-specific-part
.public final boolean opaque
scheme-specific-part
.
An opaque Uri has no scheme-specific-part
being parsed,
i.e. path
, query
and authority
are null
.
public Uri(Uri.Encoded uri) throws URISyntaxException
uri
.uri
- the RFC3986 encoded RFC2396 Uri representation to be parsed into a Uri objectURISyntaxException
- if the given string uri
doesn't fit to the
specification RFC2396 and RFC3986 or could not be parsed correctly.public static String encode(String vanilla, String legal)
Use encodeToASCIIString(String)
for US-ASCII encoding.
Consider using Encoded#Encoded(String, String)
in APIs
to distinguish encoded from unencoded data by type.
vanilla
- the string to be encodedlegal
- extended character set, allowed to be preserved in the vanilla stringpublic static String encodeToASCIIString(String unicode)
For example: Euro currency symbol -> "%E2%82%AC".
Consider using ASCIIEncoded#ASCIIEncoded(String)
in APIs
to distinguish encoded from unencoded data by type.
unicode
- string to be convertedpublic static String decode(Uri.Encoded encoded)
Uri.Encoded.decode()
call on optional encoded
instance.encoded
- Uri.Encoded
instance to be decoded, may be null
.decoded
String or null
if encoded
was null
.public static String decode(String encoded)
x-www-form-urlencoded
MIME content type using the UTF-8 encoding scheme.
'%' and two following hex digit characters are converted to the equivalent byte value. All other characters are passed through unmodified.
e.g. "A%20B%20C %24%25" -> "A B C $%"
encoded
- The encoded string.public static Uri create(String scheme, String ssp, String fragment) throws URISyntaxException
This constructor first creates a temporary Uri string from the given unencoded components. This string will be parsed later on to create the Uri instance.
[scheme:]scheme-specific-part[#fragment]
host
and port
may be undefined or invalid within scheme-specific-part
.
scheme
- the unencoded scheme part of the Uri.ssp
- the unencoded scheme-specific-part of the Uri.fragment
- the unencoded fragment part of the Uri.URISyntaxException
- if the temporary created string doesn't fit to the
specification RFC2396 or could not be parsed correctly.public static Uri create(Uri.Encoded scheme, Uri.Encoded ssp, Uri.Encoded fragment) throws URISyntaxException
This constructor first creates a temporary Uri string from the given encoded components. This string will be parsed later on to create the Uri instance.
The given encoded components are taken as-is, i.e. no re-encoding will be performed! However, Uri parsing will re-evaluate encoding of the resulting components.
[scheme:]scheme-specific-part[#fragment]
host
and port
may be undefined or invalid within scheme-specific-part
.
scheme
- the encoded scheme part of the Uri.ssp
- the encoded scheme-specific-part of the Uri.fragment
- the encoded fragment part of the Uri.URISyntaxException
- if the temporary created string doesn't fit to the
specification RFC2396 or could not be parsed correctly.public static Uri create(String scheme, String userinfo, String host, int port, String path, String query, String fragment) throws URISyntaxException
This constructor first creates a temporary Uri string from the given unencoded components. This string will be parsed later on to create the Uri instance.
[scheme:][user-info@]host[:port][path][?query][#fragment]
host
and port
must be defined and valid, if any authority
components are defined,
i.e. user-info
, host
or port
.
scheme
- the unencoded scheme part of the Uri.userinfo
- the unencoded user information of the Uri for authentication and authorization, null
for undefined.host
- the unencoded host name of the Uri, null
for undefined.port
- the port number of the Uri, -1 for undefined.path
- the unencoded path to the resource on the host.query
- the unencoded query part of the Uri to specify parameters for the resource.fragment
- the unencoded fragment part of the Uri.URISyntaxException
- if the temporary created string doesn't fit to the
specification RFC2396 or could not be parsed correctly.public static Uri create(Uri.Encoded scheme, Uri.Encoded userinfo, Uri.Encoded host, int port, Uri.Encoded path, Uri.Encoded query, Uri.Encoded fragment) throws URISyntaxException
This constructor first creates a temporary Uri string from the given encoded components. This string will be parsed later on to create the Uri instance.
The given encoded components are taken as-is, i.e. no re-encoding will be performed! However, Uri parsing will re-evaluate encoding of the resulting components.
[scheme:][user-info@]host[:port][path][?query][#fragment]
host
and port
must be defined and valid, if any authority
components are defined,
i.e. user-info
, host
or port
.
scheme
- the encoded scheme part of the Uri.userinfo
- the encoded user information of the Uri for authentication and authorization, null
for undefined.host
- the encoded host name of the Uri, null
for undefined.port
- the port number of the Uri, -1 for undefined.path
- the encoded path to the resource on the host.query
- the encoded query part of the Uri to specify parameters for the resource.fragment
- the encoded fragment part of the Uri.URISyntaxException
- if the temporary created string doesn't fit to the
specification RFC2396 or could not be parsed correctly.public static Uri create(String scheme, String host, String path, String fragment) throws URISyntaxException
This constructor first creates a temporary Uri string from the given unencoded components. This string will be parsed later on to create the Uri instance.
[scheme:]host[path][#fragment]
host
must be valid, if defined.
scheme
- the unencoded scheme part of the Uri.host
- the unencoded host name of the Uri.path
- the unencoded path to the resource on the host.fragment
- the unencoded fragment part of the Uri.URISyntaxException
- if the temporary created string doesn't fit to the
specification RFC2396 or could not be parsed correctly.public static Uri create(Uri.Encoded scheme, Uri.Encoded host, Uri.Encoded path, Uri.Encoded fragment) throws URISyntaxException
This constructor first creates a temporary Uri string from the given encoded components. This string will be parsed later on to create the Uri instance.
The given encoded components are taken as-is, i.e. no re-encoding will be performed! However, Uri parsing will re-evaluate encoding of the resulting components.
[scheme:]host[path][#fragment]
host
must be valid, if defined.
scheme
- the encoded scheme part of the Uri.host
- the encoded host name of the Uri.path
- the encoded path to the resource on the host.fragment
- the encoded fragment part of the Uri.URISyntaxException
- if the temporary created string doesn't fit to the
specification RFC2396 or could not be parsed correctly.public static Uri create(String scheme, String authority, String path, String query, String fragment) throws URISyntaxException
This constructor first creates a temporary Uri string from the given unencoded components. This string will be parsed later on to create the Uri instance.
[scheme:][//authority][path][?query][#fragment]
host
and port
may be undefined or invalid, in the optional authority
.
scheme
- the unencoded scheme part of the Uri.authority
- the unencoded authority part of the Uri.path
- the unencoded path to the resource on the host.query
- the unencoded query part of the Uri to specify parameters for the resource.fragment
- the unencoded fragment part of the Uri.URISyntaxException
- if the temporary created string doesn't fit to the
specification RFC2396 or could not be parsed correctly.public static Uri create(Uri.Encoded scheme, Uri.Encoded authority, Uri.Encoded path, Uri.Encoded query, Uri.Encoded fragment) throws URISyntaxException
This constructor first creates a temporary Uri string from the given encoded encoded components. This string will be parsed later on to create the Uri instance.
The given encoded components are taken as-is, i.e. no re-encoding will be performed! However, Uri parsing will re-evaluate encoding of the resulting components.
[scheme:][//authority][path][?query][#fragment]
host
and port
may be undefined or invalid, in the optional authority
.
scheme
- the encoded scheme part of the Uri.authority
- the encoded authority part of the Uri.path
- the encoded path to the resource on the host.query
- the encoded query part of the Uri to specify parameters for the resource.fragment
- the encoded fragment part of the Uri.URISyntaxException
- if the temporary created string doesn't fit to the
specification RFC2396 or could not be parsed correctly.public static Uri cast(String encodedUri) throws URISyntaxException
new Encoded instance
used to create the resulting Uri instance via Uri(Encoded)
.
No encoding will be performed on the given encodedUri
, use with care.
URISyntaxException
public static Uri valueOfFilepath(String path) throws URISyntaxException
This constructor first creates a temporary Uri string from the given components. This string will be parsed later on to create the Uri instance.
file:path
path
- the unencoded path of the file
schema
.URISyntaxException
- if the temporary created string doesn't fit to the
specification RFC2396 or could not be parsed correctly.public static Uri valueOf(File file) throws URISyntaxException
This constructor first creates a temporary Uri string from the given components. This string will be parsed later on to create the Uri instance.
file:path
file
- using slashified
absolute-path
for the path of the file
schema
, utilizing valueOfFilepath(String)
.URISyntaxException
- if the temporary created string doesn't fit to the
specification RFC2396 or could not be parsed correctly.public static Uri valueOf(URI uri) throws URISyntaxException
Re-encoding will be performed if the given URI is not opaque
.
See PARSE_HINT_FIX_PATH
for issues of injecting opaque URLs.
uri
- A given URI instanceURISyntaxException
- if the temporary created string doesn't fit to the
specification RFC2396 or could not be parsed correctly.public static Uri valueOf(URL url) throws URISyntaxException
valueOf(URI)
and URL#toURI()
.
Re-encoding will be performed if the given URL is not opaque
, see valueOf(URI)
.
See PARSE_HINT_FIX_PATH
for issues of injecting opaque URLs.
url
- A given URL instanceURISyntaxException
- if the temporary created string doesn't fit to the
specification RFC2396 or could not be parsed correctly.public final boolean isFileScheme()
file
scheme
, otherwise false.public final Uri.Encoded getEncoded()
input
, never null
.public Uri.ASCIIEncoded toASCIIString()
input
encoded in US-ASCII.public final URI toURI()
URI
instance using the encoded input
string, new URI(uri.input)
,
i.e. no re-encoding will be performed.#toURIReencoded(boolean)
,
valueOf(URI)
public final URI toURIReencoded() throws URISyntaxException
URI
instance based upon this instance.
All Uri parts of this instance will be decoded and encoded by the URI constructor, i.e. re-encoding will be performed.
URISyntaxException
- if the given string uri
doesn't fit to the
specification RFC2396 or could not be parsed correctly.toURI()
,
valueOf(URI)
public final URL toURL() throws MalformedURLException
URL
instance using the encoded input
string, new URL(uri.input)
,
i.e. no re-encoding will be performed.MalformedURLException
- if an error occurs while creating the URL or no protocol
handler could be found.public final File toFile()
is a file scheme
,
implementation decodes [ "//"+authority
] + path
,File.separatorChar
== '\\'
as follows:
File
instance.
Otherwise implementation returns null
.
public final Uri getContainedUri() throws URISyntaxException
schemeSpecificPart
contains a Uri itself, a sub-Uri,
return schemeSpecificPart
+ #
fragment
via it's own new Uri instance.
In case this Uri is a jar-scheme
, the query
is omitted,
since it shall be invalid for jar-schemes
anyway.
Otherwise method returns null
.
Example 1: This instance:jar:scheme2:/some/path/gluegen-rt.jar!/com/jogamp/common/GlueGenVersion.class
Returned Uri:scheme2:/some/path/gluegen-rt.jar
Example 2: This instance:jar:scheme2:/some/path/gluegen-rt.jar!/com/jogamp/common/GlueGenVersion.class?lala=01#fragment
Returned Uri:scheme2:/some/path/gluegen-rt.jar#fragment
Example 3: This instance:scheme1:scheme2:/some/path/gluegen-rt.jar!/?lala=01#fragment
Returned Uri:scheme2:/some/path/gluegen-rt.jar?lala=01#fragment
URISyntaxException
- if this Uri is a container Uri and does not comply with the container spec, i.e. a JAR Uripublic final Uri getNormalized()
Normalizes
this Uri's path and return the
normalized
form if it differs, otherwise this
instance.
Example-1: This instance :jar:http://some/path/../gluegen-rt.jar!/com/Test.class?arg=1#frag
Normalized :jar:http://some/gluegen-rt.jar!/com/Test.class?arg=1#frag
Example-2: This instance :http://some/path/../gluegen-rt.jar?arg=1#frag
Normalized :http://some/gluegen-rt.jar?arg=1#frag
public Uri getDirectory()
This Uri path will be normalized
before returning the directory.
If this Uri's directory cannot be found, or already denotes a directory, method returns this
instance.
Example-1: this-uri: http:/some/path/gluegen-rt.jar?arg=1#frag result: http:/some/path/?arg=1#frag Example-2: this-uri: file:/some/path/ result: file:/some/path/ Example-3: this-uri: file:/some/path/lala/lili/../../hello.txt result: file:/some/path/
URISyntaxException
- if the new string uri
doesn't fit to the
specification RFC2396 and RFC3986 or could not be parsed correctly.public final Uri getParent()
This Uri path will be normalized
before traversing up one directory.
If a parent folder cannot be found, method returns null
.
Example-1: This instance :jar:http://some/path/gluegen-rt.jar!/com/Test.class?arg=1#frag
Returned Uri #1:jar:http://some/path/gluegen-rt.jar!/com/?arg=1#frag
Returned Uri #2:jar:http://some/path/gluegen-rt.jar!/?arg=1#frag
Returned Uri #3:null
Example-2: This instance :http://some/path/gluegen-rt.jar?arg=1#frag
Returned Uri #1:http://some/path/?arg=1#frag
Returned Uri #2:http://some/?arg=1#frag
Returned Uri #2:null
Example-3: This instance :http://some/path/../gluegen-rt.jar?arg=1#frag
Returned Uri #1:http://some/?arg=1#frag
Returned Uri #2:null
public Uri getRelativeOf(Uri.Encoded appendPath) throws URISyntaxException
appendPath
to this instance's directory
.
If appendPath
is empty, method behaves like getNormalized()
.
This resulting path will be normalized
.
Example-1: append: null this-uri: http:/some/path/gluegen-rt.jar result: http:/some/path/gluegen-rt.jar Example-2: append: test.txt this-uri: file:/some/path/gluegen-rt.jar result: file:/some/path/test.txt Example-3: append: test.txt this-uri: file:/some/path/lala/lili/../../hello.txt result: file:/some/path/test.txt
appendPath
- denotes a relative path to be appended to this Uri's directoryURISyntaxException
- if the resulting uri
doesn't fit to the
specification RFC2396 and RFC3986 or could not be parsed correctly.public final Uri concat(Uri.Encoded suffix) throws URISyntaxException
encoded uri
of this instance and returns a new Uri instance
with the result.URISyntaxException
- if the concatenated string uri
doesn't fit to the
specification RFC2396 and RFC3986 or could not be parsed correctly.public final Uri getNewQuery(Uri.Encoded newQuery) throws URISyntaxException
newQuery
.URISyntaxException
- if this Uri is opaque
or if the new string uri
doesn't fit to the
specification RFC2396 and RFC3986 or could not be parsed correctly.public final boolean equals(Object o)
Compares this Uri instance with the given argument o
and
determines if both are equal. Two Uri instances are equal if all single
parts are identical in their meaning.