HttpUrl { static String percentDecode(String encoded, boolean plusIsSpace) { return percentDecode(encoded, 0, encoded.length(), plusIsSpace); } 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 percentDecode() throws Exception { assertEquals(Arrays.asList("\u0000"), HttpUrl.parse("http: assertEquals(Arrays.asList("a", "\u2603", "c"), HttpUrl.parse("http: assertEquals(Arrays.asList("a", "\uD83C\uDF69", "c"), HttpUrl.parse("http: assertEquals(Arrays.asList("a", "b", "c"), HttpUrl.parse("http: assertEquals(Arrays.asList("a", "z", "c"), HttpUrl.parse("http: assertEquals(Arrays.asList("a", "z", "c"), HttpUrl.parse("http: }