HttpUrl { public static HttpUrl parse(String url) { Builder builder = new Builder(); Builder.ParseResult result = builder.parse(null, url); return result == Builder.ParseResult.SUCCESS ? builder.build() : null; } private  HttpUrl(Builder builder); URL url(); URI uri(); String scheme(); boolean isHttps(); String encodedUsername(); String username(); String encodedPassword(); String password(); String host(); int port(); static int defaultPort(String scheme); int pathSize(); String encodedPath(); List<String> encodedPathSegments(); List<String> pathSegments(); String encodedQuery(); String query(); int querySize(); String queryParameter(String name); Set<String> queryParameterNames(); List<String> queryParameterValues(String name); String queryParameterName(int index); String queryParameterValue(int index); String encodedFragment(); String fragment(); HttpUrl resolve(String link); Builder newBuilder(); Builder newBuilder(String link); static HttpUrl parse(String url); static HttpUrl get(URL url); static HttpUrl get(URI uri); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static int skipLeadingAsciiWhitespace(String input, int pos, int limit); static int skipTrailingAsciiWhitespace(String input, int pos, int limit); static int delimiterOffset(String input, int pos, int limit, String delimiters); static int delimiterOffset(String input, int pos, int limit, char delimiter); static String domainToAscii(String input); static byte[] utf8Bytes(int codePoint); static void writeUtf8CodePoint(ByteBuffer byteBuffer, int codePoint); static String readUtf8String(ByteBuffer byteBuffer);  }
@Test public void hostnameMappingLastDisallowedCodePoint() throws Exception { assertEquals(null, HttpUrl.parse("http: }
@Test public void hostIpv6AddressTooManyDigitsInGroup() throws Exception { assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: }
@Test public void hostIpv6AddressMisplacedColons() throws Exception { assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: }
@Test public void hostIpv6AddressTooManyGroups() throws Exception { assertEquals(null, HttpUrl.parse("http: }
@Test public void hostIpv6AddressTooMuchCompression() throws Exception { assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: }
@Test public void hostIpv6ScopedAddress() throws Exception { assertEquals(null, HttpUrl.parse("http: }
@Test public void hostIpv6WithIpv4SuffixWithOctalPrefix() throws Exception { assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: }
@Test public void hostIpv6WithIpv4SuffixWithHexadecimalPrefix() throws Exception { assertEquals(null, HttpUrl.parse("http: }
@Test public void hostIpv6WithMalformedIpv4Suffix() throws Exception { assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: }
@Test public void hostIpv6WithIncompleteIpv4Suffix() throws Exception { assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: }
@Test public void fragmentNonAscii() throws Exception { HttpUrl url = HttpUrl.parse("http: assertEquals("http: assertEquals("Σ", url.fragment()); assertEquals("Σ", url.encodedFragment()); assertEquals("http: }
@Test public void parseHostAsciiNonPrintable() throws Exception { String host = "host\u0001"; assertNull(HttpUrl.parse("http: }
@Test public void parseNoScheme() throws Exception { assertEquals(null, HttpUrl.parse(" assertEquals(null, HttpUrl.parse("/path")); assertEquals(null, HttpUrl.parse("path")); assertEquals(null, HttpUrl.parse("?query")); assertEquals(null, HttpUrl.parse("#fragment")); }
@Test public void parseAuthoritySlashCountDoesntMatter() throws Exception { assertEquals(HttpUrl.parse("http: assertEquals(HttpUrl.parse("http: assertEquals(HttpUrl.parse("http: assertEquals(HttpUrl.parse("http: assertEquals(HttpUrl.parse("http: assertEquals(HttpUrl.parse("http: assertEquals(HttpUrl.parse("http: assertEquals(HttpUrl.parse("http: assertEquals(HttpUrl.parse("http: assertEquals(HttpUrl.parse("http: assertEquals(HttpUrl.parse("http: assertEquals(HttpUrl.parse("http: assertEquals(HttpUrl.parse("http: assertEquals(HttpUrl.parse("http: assertEquals(HttpUrl.parse("http: }
@Test public void usernameAndPassword() throws Exception { assertEquals(HttpUrl.parse("http: HttpUrl.parse("http: assertEquals(HttpUrl.parse("http: HttpUrl.parse("http: }
@Test public void hostContainsIllegalCharacter() throws Exception { assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: assertEquals(null, HttpUrl.parse("http: }