Constructs a URI from the given components.
A component may be left undefined by passing null.
This constructor first builds a URI in string form using the given components as follows:
Initially, the result string is empty.
If a scheme is given then it is appended to the result,
followed by a colon character ( ':').
If a scheme-specific part is given then it is appended. Any character that is not a legal URI character is quoted.
Finally, if a fragment is given then a hash character
( '#') is appended to the string, followed by the fragment.
Any character that is not a legal URI character is quoted.
The resulting URI string is then parsed in order to create the new
URI instance as if by invoking the URI(String) constructor;
this may cause a URISyntaxException to be thrown.
scheme | Scheme name | |
ssp | Scheme-specific part | |
fragment | Fragment |
URISyntaxException
| If the URI string constructed from the given components violates RFC 2396 |
Diagram: URL