public URI()

in src/main/java/org/apache/sling/resourceresolver/impl/helper/URI.java [236:263]


    public URI(String scheme, String authority, String path, String query, String fragment) throws URIException {

        // validate and contruct the URI character sequence
        StringBuilder buff = new StringBuilder();
        if (scheme != null) {
            buff.append(scheme);
            buff.append(':');
        }
        if (authority != null) {
            buff.append("//");
            buff.append(authority);
        }
        if (path != null) { // accept empty path
            if ((scheme != null || authority != null) && !path.startsWith("/")) {
                throw new URIException(URIException.PARSING, "abs_path requested");
            }
            buff.append(path);
        }
        if (query != null) {
            buff.append('?');
            buff.append(query);
        }
        if (fragment != null) {
            buff.append('#');
            buff.append(fragment);
        }
        parseUriReference(buff.toString(), false);
    }