public URI (String scheme, String host, String path, String fragment) throws URISyntaxException

Constructs a hierarchical URI from the given components.

A component may be left undefined by passing null.

This convenience constructor works as if by invoking the seven-argument constructor as follows:

new URI(String, String, String, int, String, String, String) (scheme, null, host, -1, path, null, fragment);

Parameters:
scheme    Scheme name
host    Host name
path    Path
fragment    Fragment

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