public URI (String scheme, String ssp, String fragment) throws URISyntaxException

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:

  1. Initially, the result string is empty.

  2. If a scheme is given then it is appended to the result, followed by a colon character ( ':').

  3. If a scheme-specific part is given then it is appended. Any character that is not a legal URI character is quoted.

  4. 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.

Parameters:
scheme    Scheme name
ssp    Scheme-specific part
fragment    Fragment

Exceptions:
URISyntaxException     If the URI string constructed from the given components violates RFC 2396