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@ifi.unizh.ch
-- mailto scheme for electronic mail addresses
news:comp.infosystems.www.servers.unix
-- news scheme for USENET news groups and articles
telnet://melvyl.ucop.edu/
-- telnet scheme for interactive services via the TELNET Protocol
Please, notice that there are many modifications from URL(RFC 1738) and
relative URL(RFC 1808).
The expressions for a URI
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
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:
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
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@ifi.unizh.ch -- mailto scheme for electronic mail addresses news:comp.infosystems.www.servers.unix -- news scheme for USENET news groups and articles telnet://melvyl.ucop.edu/ -- telnet scheme for interactive services via the TELNET ProtocolPlease, notice that there are many modifications from URL(RFC 1738) and relative URL(RFC 1808).The expressions for a URI