@Test public void rawParams() throws URISyntaxException { URI uri = URIUtil.create("http", "user", "example.com", 80, "/raw%3Dpath", "x=%3D", "frag%3Dment"); assertThat(uri.toString()).isEqualTo("http: }
public static URI create(String scheme, String rawUserInfo, String host, int port, String rawPath, String rawQuery, String rawFragment) throws URISyntaxException { StringBuilder sb = new StringBuilder(); if (scheme != null) { sb.append(scheme).append(':'); } if (host != null) { sb.append(" } if (rawUserInfo != null) { sb.append(rawUserInfo).append('@'); } if (host != null) { sb.append(host); if (port != -1) { sb.append(':').append(Integer.toString(port)); } } if (rawPath != null) { sb.append(rawPath); } if (rawQuery != null) { sb.append('?').append(rawQuery); } if (rawFragment != null) { sb.append("#").append(rawFragment); } return new URI(sb.toString()); }
URIUtil { public static URI create(String scheme, String rawUserInfo, String host, int port, String rawPath, String rawQuery, String rawFragment) throws URISyntaxException { StringBuilder sb = new StringBuilder(); if (scheme != null) { sb.append(scheme).append(':'); } if (host != null) { sb.append(" } if (rawUserInfo != null) { sb.append(rawUserInfo).append('@'); } if (host != null) { sb.append(host); if (port != -1) { sb.append(':').append(Integer.toString(port)); } } if (rawPath != null) { sb.append(rawPath); } if (rawQuery != null) { sb.append('?').append(rawQuery); } if (rawFragment != null) { sb.append("#").append(rawFragment); } return new URI(sb.toString()); } }
URIUtil { public static URI create(String scheme, String rawUserInfo, String host, int port, String rawPath, String rawQuery, String rawFragment) throws URISyntaxException { StringBuilder sb = new StringBuilder(); if (scheme != null) { sb.append(scheme).append(':'); } if (host != null) { sb.append(" } if (rawUserInfo != null) { sb.append(rawUserInfo).append('@'); } if (host != null) { sb.append(host); if (port != -1) { sb.append(':').append(Integer.toString(port)); } } if (rawPath != null) { sb.append(rawPath); } if (rawQuery != null) { sb.append('?').append(rawQuery); } if (rawFragment != null) { sb.append("#").append(rawFragment); } return new URI(sb.toString()); } private  URIUtil(); }
URIUtil { public static URI create(String scheme, String rawUserInfo, String host, int port, String rawPath, String rawQuery, String rawFragment) throws URISyntaxException { StringBuilder sb = new StringBuilder(); if (scheme != null) { sb.append(scheme).append(':'); } if (host != null) { sb.append(" } if (rawUserInfo != null) { sb.append(rawUserInfo).append('@'); } if (host != null) { sb.append(host); if (port != -1) { sb.append(':').append(Integer.toString(port)); } } if (rawPath != null) { sb.append(rawPath); } if (rawQuery != null) { sb.append('?').append(rawQuery); } if (rawFragment != null) { sb.append("#").append(rawFragment); } return new URI(sb.toString()); } private  URIUtil(); static URI create(String scheme, String rawUserInfo, String host, int port,
    String rawPath, String rawQuery, String rawFragment); static URI rebase(URI uri, URI base); }
URIUtil { public static URI create(String scheme, String rawUserInfo, String host, int port, String rawPath, String rawQuery, String rawFragment) throws URISyntaxException { StringBuilder sb = new StringBuilder(); if (scheme != null) { sb.append(scheme).append(':'); } if (host != null) { sb.append(" } if (rawUserInfo != null) { sb.append(rawUserInfo).append('@'); } if (host != null) { sb.append(host); if (port != -1) { sb.append(':').append(Integer.toString(port)); } } if (rawPath != null) { sb.append(rawPath); } if (rawQuery != null) { sb.append('?').append(rawQuery); } if (rawFragment != null) { sb.append("#").append(rawFragment); } return new URI(sb.toString()); } private  URIUtil(); static URI create(String scheme, String rawUserInfo, String host, int port,
    String rawPath, String rawQuery, String rawFragment); static URI rebase(URI uri, URI base);  }