public class URI
The interface for the URI(Uniform Resource Identifiers) version of RFC 2396. This class has the purpose of supportting of parsing a URI reference to extend any specific protocols, the character encoding of the protocol to be transported and the charset of the document.
A URI is always in an "escaped" form, since escaping or unescaping a completed URI might change its semantics. Implementers should be careful not to escape or unescape the same string more than once, since unescaping an already unescaped string might lead to misinterpreting a percent data character as another escaped character, or vice versa in the case of escaping an already escaped string. In order to avoid these problems, data types used as follows:URI character sequence: char octet sequence: byte original character sequence: String
So, a URI is a sequence of characters as an array of a char type, which is not always represented as a sequence of octets as an array of byte. URI Syntactic Components
- In general, written as follows: Absolute URI = <scheme>:<scheme-specific-part> Generic URI = <scheme>://<authority><path>?<query> - Syntax absoluteURI = scheme ":" ( hier_part | opaque_part ) hier_part = ( net_path | abs_path ) [ "?" query ] net_path = "//" authority [ abs_path ] abs_path = "/" path_segments
The following examples illustrate URI that are in common use.
ftp://ftp.is.co.za/rfc/rfc1808.txt -- ftp scheme for File Transfer Protocol services gopher://spinaltap.micro.umn.edu/00/Weather/California/Los%20Angeles -- gopher scheme for Gopher and Gopher+ Protocol services http://www.math.uio.no/faq/compression-faq/part1.html -- http scheme for Hypertext Transfer Protocol services mailto:mduerst
For escaped URI forms - URI(char[]) // constructor - char[] getRawXxx() // method - String getEscapedXxx() // method - String toString() // method For unescaped URI forms - URI(String) // constructor - String getXXX() // method
Modifiers | Name | Description |
---|---|---|
static class |
URI.DefaultCharsetChanged |
The charset-changed normal operation to represent to be required to alert to user the fact the default charset is changed. |
static class |
URI.LocaleToCharsetMap |
A mapping to determine the (somewhat arbitrarily) preferred charset for a given locale. |
Modifiers | Name | Description |
---|---|---|
static java.util.BitSet |
allowed_IPv6reference |
Those characters that are allowed for the IPv6reference component. |
static java.util.BitSet |
allowed_abs_path |
Those characters that are allowed for the abs_path. |
static java.util.BitSet |
allowed_authority |
Those characters that are allowed for the authority component. |
static java.util.BitSet |
allowed_fragment |
Those characters that are allowed for the fragment component. |
static java.util.BitSet |
allowed_host |
Those characters that are allowed for the host component. |
static java.util.BitSet |
allowed_opaque_part |
Those characters that are allowed for the opaque_part. |
static java.util.BitSet |
allowed_query |
Those characters that are allowed for the query component. |
static java.util.BitSet |
allowed_reg_name |
Those characters that are allowed for the reg_name. |
static java.util.BitSet |
allowed_rel_path |
Those characters that are allowed for the rel_path. |
static java.util.BitSet |
allowed_userinfo |
Those characters that are allowed for the userinfo component. |
static java.util.BitSet |
allowed_within_authority |
Those characters that are allowed for the authority component. |
static java.util.BitSet |
allowed_within_path |
Those characters that are allowed within the path. |
static java.util.BitSet |
allowed_within_query |
Those characters that are allowed within the query component. |
static java.util.BitSet |
allowed_within_userinfo |
Those characters that are allowed for within the userinfo component. |
static java.util.BitSet |
control |
BitSet for control. |
static java.util.BitSet |
delims |
BitSet for delims. |
static java.util.BitSet |
disallowed_opaque_part |
Disallowed opaque_part before escaping. |
static java.util.BitSet |
disallowed_rel_path |
Disallowed rel_path before escaping. |
static java.util.BitSet |
space |
BitSet for space. |
static java.util.BitSet |
unwise |
BitSet for unwise. |
static java.util.BitSet |
within_userinfo |
BitSet for within the userinfo component like user and password. |
Constructor and description |
---|
URI
(java.lang.String s, boolean escaped, java.lang.String charset) Construct a URI from a string with the given charset. |
URI
(java.lang.String s, boolean escaped) Construct a URI from a string with the given charset. |
URI
(char[] escaped, java.lang.String charset) Construct a URI as an escaped form of a character array with the given charset. |
URI
(char[] escaped) Construct a URI as an escaped form of a character array. |
URI
(java.lang.String original, java.lang.String charset) Construct a URI from the given string with the given charset. |
URI
(java.lang.String original) Construct a URI from the given string. |
URI
(java.lang.String scheme, java.lang.String schemeSpecificPart, java.lang.String fragment) Construct a general URI from the given components. |
URI
(java.lang.String scheme, java.lang.String authority, java.lang.String path, java.lang.String query, java.lang.String fragment) Construct a general URI from the given components. |
URI
(java.lang.String scheme, java.lang.String userinfo, java.lang.String host, int port) Construct a general URI from the given components. |
URI
(java.lang.String scheme, java.lang.String userinfo, java.lang.String host, int port, java.lang.String path) Construct a general URI from the given components. |
URI
(java.lang.String scheme, java.lang.String userinfo, java.lang.String host, int port, java.lang.String path, java.lang.String query) Construct a general URI from the given components. |
URI
(java.lang.String scheme, java.lang.String userinfo, java.lang.String host, int port, java.lang.String path, java.lang.String query, java.lang.String fragment) Construct a general URI from the given components. |
URI
(java.lang.String scheme, java.lang.String host, java.lang.String path, java.lang.String fragment) Construct a general URI from the given components. |
URI
(URI base, java.lang.String relative) Construct a general URI with the given relative URI string. |
URI
(URI base, java.lang.String relative, boolean escaped) Construct a general URI with the given relative URI string. |
URI
(URI base, URI relative) Construct a general URI with the given relative URI. |
Type Params | Return Type | Name and description |
---|---|---|
|
java.lang.Object |
clone() Create and return a copy of this object, the URI-reference containing the userinfo component. |
|
int |
compareTo(java.lang.Object obj) Compare this URI to another object. |
|
boolean |
equals(java.lang.Object obj) Test an object if this URI is equal to another. |
|
java.lang.String |
getAboveHierPath() Get the level above the this hierarchy level. |
|
java.lang.String |
getAuthority() Get the authority. |
|
java.lang.String |
getCurrentHierPath() Get the current hierarchy level. |
|
static java.lang.String |
getDefaultDocumentCharset() Get the recommended default charset of the document. |
|
static java.lang.String |
getDefaultDocumentCharsetByLocale() Get the default charset of the document by locale. |
|
static java.lang.String |
getDefaultDocumentCharsetByPlatform() Get the default charset of the document by platform. |
|
static java.lang.String |
getDefaultProtocolCharset() Get the default charset of the protocol. |
|
java.lang.String |
getEscapedAboveHierPath() Get the level above the this hierarchy level. |
|
java.lang.String |
getEscapedAuthority() Get the escaped authority. |
|
java.lang.String |
getEscapedCurrentHierPath() Get the escaped current hierarchy level. |
|
java.lang.String |
getEscapedFragment() Get the escaped fragment. |
|
java.lang.String |
getEscapedName() Get the escaped basename of the path. |
|
java.lang.String |
getEscapedPath() Get the escaped path. |
|
java.lang.String |
getEscapedPathQuery() Get the escaped query. |
|
java.lang.String |
getEscapedQuery() Get the escaped query. |
|
java.lang.String |
getEscapedURI() It can be gotten the URI character sequence. |
|
java.lang.String |
getEscapedURIReference() Get the escaped URI reference string. |
|
java.lang.String |
getEscapedUserinfo() Get the escaped userinfo. |
|
java.lang.String |
getFragment() Get the fragment. |
|
java.lang.String |
getHost() Get the host. |
|
java.lang.String |
getName() Get the basename of the path. |
|
java.lang.String |
getPath() Get the path. |
|
java.lang.String |
getPathQuery() Get the path and query. |
|
int |
getPort() Get the port. |
|
java.lang.String |
getProtocolCharset() Get the protocol charset used by this current URI instance. |
|
java.lang.String |
getQuery() Get the query. |
|
char[] |
getRawAboveHierPath() Get the level above the this hierarchy level. |
|
char[] |
getRawAuthority() Get the raw-escaped authority. |
|
char[] |
getRawCurrentHierPath() Get the raw-escaped current hierarchy level. |
|
char[] |
getRawFragment() Get the raw-escaped fragment. |
|
char[] |
getRawHost() Get the host. |
|
char[] |
getRawName() Get the raw-escaped basename of the path. |
|
char[] |
getRawPath() Get the raw-escaped path. |
|
char[] |
getRawPathQuery() Get the raw-escaped path and query. |
|
char[] |
getRawQuery() Get the raw-escaped query. |
|
char[] |
getRawScheme() Get the scheme. |
|
char[] |
getRawURI() It can be gotten the URI character sequence. |
|
char[] |
getRawURIReference() Get the URI reference character sequence. |
|
char[] |
getRawUserinfo() Get the raw-escaped userinfo. |
|
java.lang.String |
getScheme() Get the scheme. |
|
java.lang.String |
getURI() It can be gotten the URI character sequence. |
|
java.lang.String |
getURIReference() Get the original URI reference string. |
|
java.lang.String |
getUserinfo() Get the userinfo. |
|
boolean |
hasAuthority() Tell whether or not this URI has authority. |
|
boolean |
hasFragment() Tell whether or not this URI has fragment. |
|
boolean |
hasQuery() Tell whether or not this URI has query. |
|
boolean |
hasUserinfo() Tell whether or not this URI has userinfo. |
|
int |
hashCode() Return a hash code for this URI. |
|
boolean |
isAbsPath() Tell whether or not the relativeURI or hier_part of this URI is abs_path. |
|
boolean |
isAbsoluteURI() Tell whether or not this URI is absolute. |
|
boolean |
isHierPart() Tell whether or not the absoluteURI of this URI is hier_part. |
|
boolean |
isHostname() Tell whether or not the host part of this URI is hostname. |
|
boolean |
isIPv4address() Tell whether or not the host part of this URI is IPv4address. |
|
boolean |
isIPv6reference() Tell whether or not the host part of this URI is IPv6reference. |
|
boolean |
isNetPath() Tell whether or not the relativeURI or heir_part of this URI is net_path. |
|
boolean |
isOpaquePart() Tell whether or not the absoluteURI of this URI is opaque_part. |
|
boolean |
isRegName() Tell whether or not the authority component of this URI is reg_name. |
|
boolean |
isRelPath() Tell whether or not the relativeURI of this URI is rel_path. |
|
boolean |
isRelativeURI() Tell whether or not this URI is relative. |
|
boolean |
isServer() Tell whether or not the authority component of this URI is server. |
|
void |
normalize() Normalizes the path part of this URI. |
|
static void |
setDefaultDocumentCharset(java.lang.String charset) Set the default charset of the document. |
|
static void |
setDefaultProtocolCharset(java.lang.String charset) Set the default charset of the protocol. |
|
void |
setEscapedAuthority(java.lang.String escapedAuthority) Set the authority. |
|
void |
setEscapedFragment(java.lang.String escapedFragment) Set the escaped fragment string. |
|
void |
setEscapedPath(java.lang.String escapedPath) Set the escaped path. |
|
void |
setEscapedQuery(java.lang.String escapedQuery) Set the escaped query string. |
|
void |
setFragment(java.lang.String fragment) Set the fragment. |
|
void |
setPath(java.lang.String path) Set the path. |
|
void |
setQuery(java.lang.String query) Set the query. |
|
void |
setRawAuthority(char[] escapedAuthority) Set the authority. |
|
void |
setRawFragment(char[] escapedFragment) Set the raw-escaped fragment. |
|
void |
setRawPath(char[] escapedPath) Set the raw-escaped path. |
|
void |
setRawQuery(char[] escapedQuery) Set the raw-escaped query. |
|
java.lang.String |
toString() Get the escaped URI string. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Those characters that are allowed for the IPv6reference component. The characters '[', ']' in IPv6reference should be excluded.
Those characters that are allowed for the abs_path.
Those characters that are allowed for the authority component.
Those characters that are allowed for the fragment component.
Those characters that are allowed for the host component. The characters '[', ']' in IPv6reference should be excluded.
Those characters that are allowed for the opaque_part.
Those characters that are allowed for the query component.
Those characters that are allowed for the reg_name.
Those characters that are allowed for the rel_path.
Those characters that are allowed for the userinfo component.
Those characters that are allowed for the authority component.
Those characters that are allowed within the path.
Those characters that are allowed within the query component.
Those characters that are allowed for within the userinfo component.
BitSet for control.
BitSet for delims.
Disallowed opaque_part before escaping.
Disallowed rel_path before escaping.
BitSet for space.
BitSet for unwise.
BitSet for within the userinfo component like user and password.
Construct a URI from a string with the given charset. The input string can be either in escaped or unescaped form.
null
s
- URI character sequenceescaped
- true if URI character sequence is in escaped form.
false otherwise.charset
- the charset string to do escape encoding, if requiredConstruct a URI from a string with the given charset. The input string can be either in escaped or unescaped form.
null
s
- URI character sequenceescaped
- true if URI character sequence is in escaped form.
false otherwise.Construct a URI as an escaped form of a character array with the given charset.
escaped
is null
escaped
- the URI character sequencecharset
- the charset string to do escape encodingConstruct a URI as an escaped form of a character array. An URI can be placed within double-quotes or angle brackets like "http://test.com/" and <http://test.com/>
escaped
is null
escaped
- the URI character sequenceConstruct a URI from the given string with the given charset.
original
- the string to be represented to URI character sequence
It is one of absoluteURI and relativeURI.charset
- the charset string to do escape encodingConstruct a URI from the given string.
URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]
An URI can be placed within double-quotes or angle brackets like "http://test.com/" and <http://test.com/>
original
- the string to be represented to URI character sequence
It is one of absoluteURI and relativeURI.Construct a general URI from the given components.
URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ] absoluteURI = scheme ":" ( hier_part | opaque_part ) opaque_part = uric_no_slash *uric
It's for absolute URI = <scheme>:<scheme-specific-part># <fragment>.
scheme
- the scheme stringschemeSpecificPart
- scheme_specific_partfragment
- the fragment stringConstruct a general URI from the given components.
URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ] absoluteURI = scheme ":" ( hier_part | opaque_part ) relativeURI = ( net_path | abs_path | rel_path ) [ "?" query ] hier_part = ( net_path | abs_path ) [ "?" query ]
It's for absolute URI = <scheme>:<path>?<query>#< fragment> and relative URI = <path>?<query>#<fragment >.
scheme
- the scheme stringauthority
- the authority stringpath
- the path stringquery
- the query stringfragment
- the fragment stringConstruct a general URI from the given components.
scheme
- the scheme stringuserinfo
- the userinfo stringhost
- the host stringport
- the port numberConstruct a general URI from the given components.
scheme
- the scheme stringuserinfo
- the userinfo stringhost
- the host stringport
- the port numberpath
- the path stringConstruct a general URI from the given components.
scheme
- the scheme stringuserinfo
- the userinfo stringhost
- the host stringport
- the port numberpath
- the path stringquery
- the query stringConstruct a general URI from the given components.
scheme
- the scheme stringuserinfo
- the userinfo stringhost
- the host stringport
- the port numberpath
- the path stringquery
- the query stringfragment
- the fragment stringConstruct a general URI from the given components.
scheme
- the scheme stringhost
- the host stringpath
- the path stringfragment
- the fragment stringConstruct a general URI with the given relative URI string.
base
- the base URIrelative
- the relative URI stringConstruct a general URI with the given relative URI string.
base
- the base URIrelative
- the relative URI stringescaped
- true if URI character sequence is in escaped form.
false otherwise.Construct a general URI with the given relative URI.
URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ] relativeURI = ( net_path | abs_path | rel_path ) [ "?" query ]
Resolving Relative References to Absolute Form.
Examples of Resolving Relative URI References Within an object with a well-defined base URI ofhttp://a/b/c/d;p?q
the relative URI would be resolved as follows:
Normal Examplesg:h = g:h g = http://a/b/c/g ./g = http://a/b/c/g g/ = http://a/b/c/g/ /g = http://a/g //g = http://g ?y = http://a/b/c/?y g?y = http://a/b/c/g?y #s = (current document)#s g#s = http://a/b/c/g#s g?y#s = http://a/b/c/g?y#s ;x = http://a/b/c/;x g;x = http://a/b/c/g;x g;x?y#s = http://a/b/c/g;x?y#s . = http://a/b/c/ ./ = http://a/b/c/ .. = http://a/b/ ../ = http://a/b/ ../g = http://a/b/g ../.. = http://a/ ../../ = http://a/ ../../g = http://a/g
Some URI schemes do not allow a hierarchical syntax matching the
base
- the base URIrelative
- the relative URI Create and return a copy of this object, the URI-reference containing
the userinfo component. Notice that the whole URI-reference including
the userinfo component counld not be gotten as a String
.
URI
object including the userinfo
component, it should be used.
Compare this URI to another object.
obj
- the object to be compared.Test an object if this URI is equal to another.
obj
- an object to compareGet the level above the this hierarchy level.
Get the authority.
Get the current hierarchy level.
Get the recommended default charset of the document.
Get the default charset of the document by locale.
Get the default charset of the document by platform.
Get the default charset of the protocol.
An individual URI scheme may require a single charset, define a default charset, or provide a way to indicate the charset used. To work globally either requires support of a number of character sets and to be able to convert between them, or the use of a single preferred character set. For support of global compatibility it is STRONGLY RECOMMENDED that clients and servers use UTF-8 encoding when exchanging URIs.Get the level above the this hierarchy level.
Get the escaped authority.
Get the escaped current hierarchy level.
Get the escaped fragment.
Get the escaped basename of the path.
Get the escaped path.
path = [ abs_path | opaque_part ] abs_path = "/" path_segments opaque_part = uric_no_slash *uric
Get the escaped query.
Get the escaped query.
It can be gotten the URI character sequence. It's escaped. For the purpose of the protocol to be transported, it will be useful.
Get the escaped URI reference string.
Get the escaped userinfo.
Get the fragment.
Get the host.
host = hostname | IPv4address | IPv6reference
Get the basename of the path.
Get the path.
path = [ abs_path | opaque_part ]
Get the path and query.
Get the port. In order to get the specfic default port, the specific protocol-supported class extended from the URI class should be used. It has the server-based naming authority.
Get the protocol charset used by this current URI instance. It was set by the constructor for this instance. If it was not set by contructor, it will return the default protocol charset.
Get the query.
Get the level above the this hierarchy level.
Get the raw-escaped authority.
Get the raw-escaped current hierarchy level.
Get the raw-escaped fragment.
The optional fragment identifier is not part of a URI, but is often used in conjunction with a URI. The format and interpretation of fragment identifiers is dependent on the media type [RFC2046] of the retrieval result. A fragment identifier is only meaningful when a URI reference is intended for retrieval and the result of that retrieval is a document for which the identified fragment is consistently defined.Get the host.
host = hostname | IPv4address | IPv6reference
Get the raw-escaped basename of the path.
Get the raw-escaped path.
path = [ abs_path | opaque_part ]
Get the raw-escaped path and query.
Get the raw-escaped query.
Get the scheme.
It can be gotten the URI character sequence. It's raw-escaped. For the purpose of the protocol to be transported, it will be useful.
It is clearly unwise to use a URL that contains a password which is intended to be secret. In particular, the use of a password within the 'userinfo' component of a URL is strongly disrecommended except in those rare cases where the 'password' parameter is intended to be public. When you want to get each part of the userinfo, you need to use the specific methods in the specific URL. It depends on the specific URL.Get the URI reference character sequence.
Get the raw-escaped userinfo.
Get the scheme.
It can be gotten the URI character sequence.
Get the original URI reference string.
Get the userinfo.
Tell whether or not this URI has authority. It's the same function as the is_net_path() method.
Tell whether or not this URI has fragment.
Tell whether or not this URI has query.
Tell whether or not this URI has userinfo.
Return a hash code for this URI.
Tell whether or not the relativeURI or hier_part of this URI is abs_path.
Tell whether or not this URI is absolute.
Tell whether or not the absoluteURI of this URI is hier_part.
Tell whether or not the host part of this URI is hostname.
Tell whether or not the host part of this URI is IPv4address.
Tell whether or not the host part of this URI is IPv6reference.
Tell whether or not the relativeURI or heir_part of this URI is net_path. It's the same function as the has_authority() method.
Tell whether or not the absoluteURI of this URI is opaque_part.
Tell whether or not the authority component of this URI is reg_name.
Tell whether or not the relativeURI of this URI is rel_path.
Tell whether or not this URI is relative.
Tell whether or not the authority component of this URI is server.
Normalizes the path part of this URI. Normalization is only meant to be performed on URIs with an absolute path. Calling this method on a relative path URI will have no effect.
Set the default charset of the document.
Notice that it will be possible to contain mixed characters (e.g. ftp://host/KoreanNamespace/ChineseResource). To handle the Bi-directional display of these character sets, the protocol charset could be simply used again. Because it's not yet implemented that the insertion of BIDI control characters at different points during composition is extracted. Always all the time, the setter method is always succeeded and throwsDefaultCharsetChanged
exception.
So API programmer must follow the following way:
import org.apache.util.URI$DefaultCharsetChanged;
.
.
.
try {
URI.setDefaultDocumentCharset("EUC-KR");
} catch (DefaultCharsetChanged cc) {
// CASE 1: the exception could be ignored, when it is set by user
if (cc.getReasonCode() == DefaultCharsetChanged.DOCUMENT_CHARSET) {
// CASE 2: let user know the default document charset changed
} else {
// CASE 2: let user know the default protocol charset changed
}
}
The API programmer is responsible to set the correct charset.
And each application should remember its own charset to support.charset
- the default charset for the documentSet the default charset of the protocol.
The character set used to store files SHALL remain a local decision and MAY depend on the capability of local operating systems. Prior to the exchange of URIs they SHOULD be converted into a ISO/IEC 10646 format and UTF-8 encoded. This approach, while allowing international exchange of URIs, will still allow backward compatibility with older systems because the code set positions for ASCII characters are identical to the one byte sequence in UTF-8. An individual URI scheme may require a single charset, define a default charset, or provide a way to indicate the charset used. Always all the time, the setter method is always succeeded and throwsDefaultCharsetChanged
exception.
So API programmer must follow the following way:
import org.apache.util.URI$DefaultCharsetChanged;
.
.
.
try {
URI.setDefaultProtocolCharset("UTF-8");
} catch (DefaultCharsetChanged cc) {
// CASE 1: the exception could be ignored, when it is set by user
if (cc.getReasonCode() == DefaultCharsetChanged.PROTOCOL_CHARSET) {
// CASE 2: let user know the default protocol charset changed
} else {
// CASE 2: let user know the default document charset changed
}
}
The API programmer is responsible to set the correct charset.
And each application should remember its own charset to support.charset
- the default charset for each protocolSet the authority. It can be one type of server, hostport, hostname, IPv4address, IPv6reference and reg_name. Note that there is no setAuthority method by the escape encoding reason.
escapedAuthority
- the escaped authority stringSet the escaped fragment string.
escapedFragment
- the escaped fragment stringSet the escaped path.
escapedPath
- the escaped path stringSet the escaped query string.
escapedQuery
- the escaped query stringSet the fragment.
fragment
- the fragment string.Set the path.
path
- the path stringSet the query.
When a query string is not misunderstood the reserved special characters ("&", "=", "+", ",", and "$") within a query component, it is recommended to use in encoding the whole query with this method. The additional APIs for the special purpose using by the reserved special characters used in each protocol are implemented in each protocol classes inherited fromURI
. So refer to the same-named APIs
implemented in each specific protocol instance.query
- the query string.Set the authority. It can be one type of server, hostport, hostname, IPv4address, IPv6reference and reg_name.
authority = server | reg_name
escapedAuthority
- the raw escaped authoritySet the raw-escaped fragment.
escapedFragment
- the raw-escaped fragmentSet the raw-escaped path.
escapedPath
- the path character sequenceSet the raw-escaped query.
escapedQuery
- the raw-escaped queryGet the escaped URI string.
On the document, the URI-reference form is only used without the userinfo component like http://jakarta.apache.org/ by the security reason. But the URI-reference form with the userinfo component could be parsed. In other words, this URI and any its subclasses must not expose the URI-reference expression with the userinfo component like http://user:password@hostport/restricted_zone.