public URI(String scheme, String authority, String path, String query,String fragment) throws URISyntaxException {if (scheme != null && path != null && !path.isEmpty() && path.charAt(0) != '/') {throw new URISyntaxException(path, "Relative path");}StringBuilder uri = new StringBuilder();if (scheme != null) {uri.append(scheme);uri.append(':');}if (authority != null) {uri.append("AUTHORITY_ENCODER.appendEncoded(uri, authority);}if (path != null) {PATH_ENCODER.appendEncoded(uri, path);}if (query != null) {uri.append('?');ALL_LEGAL_ENCODER.appendEncoded(uri, query);}if (fragment != null) {uri.append('#');ALL_LEGAL_ENCODER.appendEncoded(uri, fragment);}parseURI(uri.toString(), false);}

public URI(string scheme, string authority, string path, string query, string fragment){if (scheme != null && path != null && !string.IsNullOrEmpty(path) && path[0] != '/'){throw new java.net.URISyntaxException(path, "Relative path");}java.lang.StringBuilder uri = new java.lang.StringBuilder();if (scheme != null){uri.append(scheme);uri.append(':');}if (authority != null){uri.append("AUTHORITY_ENCODER.appendEncoded(uri, authority);}if (path != null){PATH_ENCODER.appendEncoded(uri, path);}if (query != null){uri.append('?');ALL_LEGAL_ENCODER.appendEncoded(uri, query);}if (fragment != null){uri.append('#');ALL_LEGAL_ENCODER.appendEncoded(uri, fragment);}parseURI(uri.ToString(), false);}
