Home
last modified time | relevance | path

Searched refs:URI (Results 1 – 25 of 72) sorted by relevance

123

/libcore/luni/src/test/java/libcore/java/net/
DURITest.java20 import java.net.URI;
27 URI uri = new URI("http://username:password@host:8080/directory/file?query#ref"); in testUriParts()
48 assertEquals(new URI("HTTP://localhost/foo?bar=baz#quux"), in testEqualsCaseMapping()
49 new URI("HTTP://localhost/foo?bar=baz#quux")); in testEqualsCaseMapping()
50 assertEquals(new URI("http://localhost/foo?bar=baz#quux"), in testEqualsCaseMapping()
51 new URI("http://LOCALHOST/foo?bar=baz#quux")); in testEqualsCaseMapping()
52 assertFalse(new URI("http://localhost/foo?bar=baz#quux") in testEqualsCaseMapping()
53 .equals(new URI("http://localhost/FOO?bar=baz#quux"))); in testEqualsCaseMapping()
54 assertFalse(new URI("http://localhost/foo?bar=baz#quux") in testEqualsCaseMapping()
55 .equals(new URI("http://localhost/foo?BAR=BAZ#quux"))); in testEqualsCaseMapping()
[all …]
DOldURITest.java20 import java.net.URI;
94 new URI(s); in test_createLjava_lang_String()
102 URI.create(s); in test_createLjava_lang_String()
111 URI b = new URI("http://www.google.com/dir1/dir2"); in test_relativizeLjava_net_URI()
120 URI b = new URI("http://www.test.com/dir"); in test_resolveLjava_net_URI()
121 b.resolve((URI) null); in test_resolveLjava_net_URI()
129 URI b = new URI("http://www.test.com/dir"); in test_resolveLjava_lang_String()
136 URI b = new URI("http://www.test.com/dir"); in test_resolveLjava_lang_String()
145 new URI(null); in test_ConstructorLjava_lang_String()
DUrlEncodingTest.java20 import java.net.URI;
31 assertEquals("%61", new URI("http://foo#%61").getRawFragment()); in testUriRetainsOriginalEncoding()
40 assertEquals("a+b", new URI("http://foo#a+b").getFragment()); in testDecodingPlus()
46 assertEquals("a+b", new URI("http", "foo", "/", "a+b").getRawFragment()); in testEncodingPlus()
53 new URI("http://foo#a b"); in testDecodingSpace()
62 assertEquals("a%20b", new URI("http", "foo", "/", "a b").getRawFragment()); in testEncodingSpace()
67 new URI("http://foo#%"); in testUriDecodingPartial()
72 new URI("http://foo#%0"); in testUriDecodingPartial()
93 new URI("http://foo#%0g"); in testUriDecodingInvalid()
192 new URI("http://foo#" + "%\u0664\u0661"); in testDecodingNonUsDigits()
[all …]
DOldAndroidURITest.java19 import java.net.URI;
32 URI uri = new URI(str); in construct()
45 URI b = URI.create(base); in resolve()
46 URI resolved = b.resolve(uri); in resolve()
DCookiesTest.java29 import java.net.URI;
176 cookieManager.put(new URI("http://android.com"), cookieHeaders("a=android", "b=banana")); in testResponseWithMultipleCookieHeaderLines()
190 cookieManager.put(new URI("http://android.com/"), cookieHeaders("a=android")); in testDomainDefaulting()
197 cookieManager.put(new URI("http://android.com/"), in testNonMatchingDomainsRejected()
205 cookieManager.put(new URI("http://www.android.com/"), in testMatchingDomainsAccepted()
213 cookieManager.put(new URI("http://android.com/foo/bar"), cookieHeaders("a=android")); in testPathDefaulting()
215 cookieManager.put(new URI("http://android.com/"), cookieHeaders("b=banana")); in testPathDefaulting()
217 cookieManager.put(new URI("http://android.com/foo/"), cookieHeaders("c=carrot")); in testPathDefaulting()
224 cookieManager.put(new URI("http://android.com/foo/bar"), in testNonMatchingPathsRejected()
233 cookieManager.put(new URI("http://android.com/foo/bar/"), in testMatchingPathsAccepted()
[all …]
DProxySelectorTest.java22 import java.net.URI;
31 private URI httpUri;
32 private URI ftpUri;
33 private URI httpsUri;
34 private URI socketUri;
35 private URI otherUri;
40 httpUri = new URI("http://android.com"); in setUp()
41 ftpUri = new URI("ftp://android.com"); in setUp()
42 httpsUri = new URI("https://android.com"); in setUp()
43 socketUri = new URI("socket://android.com"); in setUp()
[all …]
DOldCookieHandlerTest.java24 import java.net.URI;
70 public Map get(URI uri, Map requestHeaders) throws IOException { in get()
75 public void put(URI uri, Map responseHeaders) throws IOException { in put()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
DURITest.java21 import java.net.URI;
28 private URI[] uris;
30 private URI[] getUris() throws URISyntaxException { in getUris()
35 uris = new URI[] { in getUris()
37 new URI( in getUris()
40 new URI( in getUris()
43 new URI( in getUris()
49 new URI("http", "user%60%20info", "host", 80, "/a%20path", //$NON-NLS-4$ in getUris()
52 new URI("http", "user%C3%9F%C2%A3info", "host", -1, in getUris()
56 new URI("ascheme", "user\u00DF\u00A3info", "host", 80, in getUris()
[all …]
DCookieManagerTest.java24 import java.net.URI;
35 private static void checkValidParams4Get(URI uri, in checkValidParams4Get()
47 private static void checkValidParams4Put(URI uri, in checkValidParams4Put()
68 checkValidParams4Get(new URI(""), null); in test_Put_Get_LURI_LMap_exception()
69 checkValidParams4Get(new URI("http://www.test.com"), null); in test_Put_Get_LURI_LMap_exception()
74 checkValidParams4Put(new URI(""), null); in test_Put_Get_LURI_LMap_exception()
75 checkValidParams4Put(new URI("http://www.test.com"), null); in test_Put_Get_LURI_LMap_exception()
99 URI uri = new URI(cookies[i][j]); in store()
147 Map<String, List<String>> map = manager.get(new URI("http://a.b.c/"), in test_Put_Get_LURI_LMap()
155 map = manager.get(new URI("http://a.b.c/te"), dummyMap); in test_Put_Get_LURI_LMap()
[all …]
DCookieStoreTest.java22 import java.net.URI;
38 URI uri = new URI("http://harmony.test.unit.org"); in test_add_LURI_LHttpCookie()
84 URI uri2 = new URI("http://.test.unit.org"); in test_add_LURI_LHttpCookie()
117 URI baduri = new URI("bad_url"); in test_add_LURI_LHttpCookie()
136 URI uri1 = new URI("http://get.uri1.test.org"); in test_get_LURI()
144 URI uri2 = new URI("http://get.uri2.test.org"); in test_get_LURI()
190 URI uri3 = new URI("http://get.uri3.test.org"); in test_get_LURI()
192 URI baduri = new URI("invalid_uri"); in test_get_LURI()
206 URI uri1 = new URI("http://getcookies1.test.org"); in test_getCookies()
212 URI uri2 = new URI("http://getcookies2.test.org"); in test_getCookies()
[all …]
DCookiePolicyTest.java21 import java.net.URI;
35 URI uri = new URI(""); in test_ShouldAccept_LURI_LHttpCookie()
82 accept = CookiePolicy.ACCEPT_ORIGINAL_SERVER.shouldAccept(new URI( in test_ShouldAccept_LURI_LHttpCookie()
87 accept = CookiePolicy.ACCEPT_ORIGINAL_SERVER.shouldAccept(new URI( in test_ShouldAccept_LURI_LHttpCookie()
92 accept = CookiePolicy.ACCEPT_ORIGINAL_SERVER.shouldAccept(new URI( in test_ShouldAccept_LURI_LHttpCookie()
97 accept = CookiePolicy.ACCEPT_ORIGINAL_SERVER.shouldAccept(new URI( in test_ShouldAccept_LURI_LHttpCookie()
102 accept = CookiePolicy.ACCEPT_ORIGINAL_SERVER.shouldAccept(new URI( in test_ShouldAccept_LURI_LHttpCookie()
107 accept = CookiePolicy.ACCEPT_ORIGINAL_SERVER.shouldAccept(new URI( in test_ShouldAccept_LURI_LHttpCookie()
DProxySelectorTest.java25 import java.net.URI;
51 private static URI httpUri;
53 private static URI ftpUri;
55 private static URI httpsUri;
57 private static URI tcpUri;
65 httpUri = new URI("http://test.com");
66 ftpUri = new URI("ftp://test.com");
67 httpsUri = new URI("https://test.com");
68 tcpUri = new URI("socket://host.com");
149 httpUri = new URI("http://a@"); in test_selectLjava_net_URI_SelectExact_NullHost()
[all …]
DCookieHandlerTest.java22 import java.net.URI;
53 public Map get(URI uri, Map requestHeaders) throws IOException { in get()
57 public void put(URI uri, Map responseHeaders) throws IOException { in put()
DResponseCacheTest.java24 import java.net.URI;
60 public CacheResponse get(URI arg0, String arg1, Map arg2) in get()
65 public CacheRequest put(URI arg0, URLConnection arg1) in put()
/libcore/luni/src/main/java/java/net/
DCookieStoreImpl.java32 private final Map<URI, List<HttpCookie>> map = new HashMap<URI, List<HttpCookie>>();
34 public synchronized void add(URI uri, HttpCookie cookie) { in add()
50 private URI cookiesUri(URI uri) { in cookiesUri()
55 return new URI("http", uri.getHost(), null, null); in cookiesUri()
61 public synchronized List<HttpCookie> get(URI uri) { in get()
82 for (Map.Entry<URI, List<HttpCookie>> entry : map.entrySet()) { in get()
119 public synchronized List<URI> getURIs() { in getURIs()
120 List<URI> result = new ArrayList<URI>(map.keySet()); in getURIs()
125 public synchronized boolean remove(URI uri, HttpCookie cookie) { in remove()
DCookieStore.java50 void add(URI uri, HttpCookie cookie); in add()
64 List<HttpCookie> get(URI uri); in get()
81 List<URI> getURIs(); in getURIs()
95 boolean remove(URI uri, HttpCookie cookie); in remove()
DCookiePolicy.java34 public boolean shouldAccept(URI uri, HttpCookie cookie) {
43 public boolean shouldAccept(URI uri, HttpCookie cookie) {
52 public boolean shouldAccept(URI uri, HttpCookie cookie) {
67 boolean shouldAccept(URI uri, HttpCookie cookie); in shouldAccept()
DURI.java132 public final class URI implements Comparable<URI>, Serializable { class
196 private URI() {} in URI() method in URI
203 public URI(String spec) throws URISyntaxException { in URI() method in URI
212 public URI(String scheme, String schemeSpecificPart, String fragment) in URI() method in URI
235 public URI(String scheme, String userInfo, String host, int port, String path, String query, in URI() method in URI
297 public URI(String scheme, String host, String path, String fragment) throws URISyntaxException { in URI() method in URI
306 public URI(String scheme, String authority, String path, String query, in URI() method in URI
618 public int compareTo(URI uri) { in compareTo()
729 public static URI create(String uri) { in create()
731 return new URI(uri); in create()
[all …]
DProxySelector.java117 public abstract List<Proxy> select(URI uri); in select()
129 public abstract void connectFailed(URI uri, SocketAddress address, IOException failure); in connectFailed()
DResponseCache.java64 public abstract CacheResponse get(URI uri, String requestMethod, in get()
84 public abstract CacheRequest put(URI uri, URLConnection connection) throws IOException; in put()
DCookieHandler.java55 public abstract Map<String, List<String>> get(URI uri, in get()
69 public abstract void put(URI uri, Map<String, List<String>> responseHeaders) in put()
DProxySelectorImpl.java25 @Override public void connectFailed(URI uri, SocketAddress sa, IOException ioe) { in connectFailed()
31 @Override public List<Proxy> select(URI uri) { in select()
35 private Proxy selectOneProxy(URI uri) { in selectOneProxy()
DURL.java504 public URI toURI() throws URISyntaxException { in toURI()
505 return new URI(toExternalForm()); in toURI()
514 public URI toURILenient() throws URISyntaxException { in toURILenient()
518 return new URI(streamHandler.toExternalForm(this, true)); in toURILenient()
574 return URI.getEffectivePort(protocol, port); in getEffectivePort()
/libcore/benchmarks/src/benchmarks/regression/
DEqualsHashCodeBenchmark.java21 import java.net.URI;
26 URI() { in URI() enumConstant
28 return new URI(text); in URI()
/libcore/luni/src/main/java/java/io/
DFile.java23 import java.net.URI;
175 public File(URI uri) { in File()
218 private static void checkURI(URI uri) { in checkURI()
1056 public URI toURI() { in toURI()
1061 return new URI("file", null, "/" + name, null, null); in toURI()
1063 return new URI("file", "", name, null); // UNC path in toURI()
1065 return new URI("file", null, name, null, null); in toURI()

123