@Test public void testWithNewScheme() { Uri uri = new Uri("http", "user", "example.com", 44, "/path/path2", "query=4", null); Uri newUri = uri.withNewScheme("https"); assertEquals(newUri.getScheme(), "https"); assertEquals(newUri.toUrl(), "https: }
public Uri withNewScheme(String newScheme) { return new Uri(newScheme, userInfo, host, port, path, query, fragment); }
Uri { public Uri withNewScheme(String newScheme) { return new Uri(newScheme, userInfo, host, port, path, query, fragment); } }
Uri { public Uri withNewScheme(String newScheme) { return new Uri(newScheme, userInfo, host, port, path, query, fragment); } Uri(String scheme,
             String userInfo,
             String host,
             int port,
             String path,
             String query,
             String fragment); }
Uri { public Uri withNewScheme(String newScheme) { return new Uri(newScheme, userInfo, host, port, path, query, fragment); } Uri(String scheme,
             String userInfo,
             String host,
             int port,
             String path,
             String query,
             String fragment); static Uri create(String originalUrl); static Uri create(Uri context, final String originalUrl); String getQuery(); String getPath(); String getUserInfo(); int getPort(); String getScheme(); String getHost(); String getFragment(); boolean isSecured(); boolean isWebSocket(); URI toJavaNetURI(); int getExplicitPort(); int getSchemeDefaultPort(); String toUrl(); String toBaseUrl(); String toRelativeUrl(); String toFullUrl(); String getBaseUrl(); String getAuthority(); boolean isSameBase(Uri other); String getNonEmptyPath(); @Override String toString(); Uri withNewScheme(String newScheme); Uri withNewQuery(String newQuery); @Override int hashCode(); @Override boolean equals(Object obj); static void validateSupportedScheme(Uri uri); }
Uri { public Uri withNewScheme(String newScheme) { return new Uri(newScheme, userInfo, host, port, path, query, fragment); } Uri(String scheme,
             String userInfo,
             String host,
             int port,
             String path,
             String query,
             String fragment); static Uri create(String originalUrl); static Uri create(Uri context, final String originalUrl); String getQuery(); String getPath(); String getUserInfo(); int getPort(); String getScheme(); String getHost(); String getFragment(); boolean isSecured(); boolean isWebSocket(); URI toJavaNetURI(); int getExplicitPort(); int getSchemeDefaultPort(); String toUrl(); String toBaseUrl(); String toRelativeUrl(); String toFullUrl(); String getBaseUrl(); String getAuthority(); boolean isSameBase(Uri other); String getNonEmptyPath(); @Override String toString(); Uri withNewScheme(String newScheme); Uri withNewQuery(String newQuery); @Override int hashCode(); @Override boolean equals(Object obj); static void validateSupportedScheme(Uri uri); static final String HTTP; static final String HTTPS; static final String WS; static final String WSS; }