Home
last modified time | relevance | path

Searched refs:URL (Results 1 – 25 of 153) sorted by relevance

1234567

/libcore/luni/src/test/java/libcore/java/net/
DURLTest.java24 import java.net.URL;
33 URL url = new URL("http://username:password@host:8080/directory/file?query#ref"); in testUrlParts()
47 URL url = new URL("http://www.google.com:80/example?language[id]=2"); in testExplicitPort()
63 URL urlByHostName = new URL("http://localhost/foo?bar=baz#quux"); in testEqualsDoesNotDoHostnameResolution()
64 URL urlByAddress = new URL("http://" + address + "/foo?bar=baz#quux"); in testEqualsDoesNotDoHostnameResolution()
71 assertEquals(new URL("HTTP://localhost/foo?bar=baz#quux"), in testEqualsCaseMapping()
72 new URL("HTTP://localhost/foo?bar=baz#quux")); in testEqualsCaseMapping()
73 assertTrue(new URL("http://localhost/foo?bar=baz#quux").equals( in testEqualsCaseMapping()
74 new URL("http://LOCALHOST/foo?bar=baz#quux"))); in testEqualsCaseMapping()
75 assertFalse(new URL("http://localhost/foo?bar=baz#quux").equals( in testEqualsCaseMapping()
[all …]
DOldURLStreamHandlerTest.java24 import java.net.URL;
35 URL url1 = new URL("ftp://test_url/test?a=b&c=%D0+%D1"); in test_equalsLjava_net_URLLjava_net_URL()
36 URL url2 = new URL("http://test_url/test?a=b&c=%D0+%D1"); in test_equalsLjava_net_URLLjava_net_URL()
39 new URL("http://test_url+/test?a=b&c=%D0+%D1"); in test_equalsLjava_net_URLLjava_net_URL()
55 URL url1 = new URL("ftp://test_url/test?a=b&c=%D0+%D1"); in test_getHostAddress()
58 URL url2 = new URL("http://test:pwd@fakehostname.fakedomain/test?a=b&c=%D0+%D1"); in test_getHostAddress()
61 URL url3 = new URL("http://localhost/test"); in test_getHostAddress()
66 URL url1 = new URL("ftp://test_url/test?a=b&c=%D0+%D1"); in test_hashCodeLjava_net_URL()
67 URL url2 = new URL("http://test_url/test?a=b&c=%D0+%D1"); in test_hashCodeLjava_net_URL()
70 new URL("http://test_url+/test?a=b&c=%D0+%D1"); in test_hashCodeLjava_net_URL()
[all …]
DOldURLTest.java33 import java.net.URL;
58 new URL("http", "apache.org", 123456789, "file"); in test_ConstructorLjava_lang_StringLjava_lang_StringILjava_lang_String()
60 new URL("http", "apache.org", -123, "file"); in test_ConstructorLjava_lang_StringLjava_lang_StringILjava_lang_String()
69 URL testURL = new URL("http", "www.apache.org:8082", "test.html#anch"); in test_ConstructorLjava_lang_StringLjava_lang_StringLjava_lang_String()
77 new URL("hftp", "apache.org:8082", "test.html#anch"); in test_ConstructorLjava_lang_StringLjava_lang_StringLjava_lang_String()
90 new URL("test_protocol", "", "fake.jar"); in test_java_protocol_handler_pkgs_prop()
97 URL testURL1 = new URL("http", "www.apache.org:8080", "test.html#anch"); in testHashCode()
98 URL testURL2 = new URL("http", "www.apache.org:8080", "test.html#anch"); in testHashCode()
99 URL changedURL = new URL("http", "www.apache.org:8082", in testHashCode()
113 URL fileURL = sampleFile.toURL(); in testSetURLStreamHandlerFactory()
[all …]
DOldURLClassLoaderTest.java25 import java.net.URL;
45 URL[] u = new URL[0]; in test_Constructor$Ljava_net_URL()
51 URL [] urls = {new URL("http://foo.com/foo"), in test_Constructor$Ljava_net_URL()
52 new URL("jar:file://foo.jar!/foo.c"), in test_Constructor$Ljava_net_URL()
53 new URL("ftp://foo1/foo2/foo.c")}; in test_Constructor$Ljava_net_URL()
66 new URLClassLoader(new URL[] { null }); in test_Constructor$Ljava_net_URL()
98 URL[] urls = new URL[2]; in test_findResourcesLjava_lang_String()
99 urls[0] = new URL("file://" + tmpDir.getAbsolutePath() + "/"); in test_findResourcesLjava_lang_String()
100 urls[1] = new URL("file://" + subDir.getAbsolutePath() + "/"); in test_findResourcesLjava_lang_String()
103 Enumeration<URL> res = ucl.findResources("test0"); in test_findResourcesLjava_lang_String()
[all …]
DOldJarURLConnectionTest.java27 import java.net.URL;
46 private URL createContent(String jarFile, String inFile) in createContent()
54 return new URL("jar:file:" + file.getPath() + "!/" + inFile); in createContent()
58 URL u = createContent("lf.jar", "swt.dll"); in test_getAttributes()
63 URL invURL = createContent("InvalidJar.jar", "Test.class"); in test_getAttributes()
75 URL u = createContent("TestCodeSigners.jar", "Test.class"); in test_getCertificates()
88 URL invURL = createContent("InvalidJar.jar", "Test.class"); in test_getCertificates()
100 URL u = createContent("lf.jar", "swt.dll"); in test_getManifest()
108 URL invURL = createContent("InvalidJar.jar", "Test.class"); in test_getManifest()
120 URL u = createContent("lf.jar", "plus.bmp"); in test_getEntryName()
[all …]
DURLStreamHandlerFactoryTest.java20 import java.net.URL;
33 for (Field field : URL.class.getDeclaredFields()) { in setUp()
48 URL.setURLStreamHandlerFactory(oldFactory); in tearDown()
55 URL.setURLStreamHandlerFactory(shf); in testCreateURLStreamHandler()
56 URL url = new URL("http://android.com/"); in testCreateURLStreamHandler()
62 URL.setURLStreamHandlerFactory(shf); in testCreateURLStreamHandler()
68 URL.setURLStreamHandlerFactory(null); in testCreateURLStreamHandler()
77 URL.setURLStreamHandlerFactory(oldFactory); in testInstallCustomProtocolHandler()
81 URLConnection connection = new URL("http://android.com/").openConnection(); in testInstallCustomProtocolHandler()
91 URL.setURLStreamHandlerFactory(oldFactory); in testFirstUseIsCached()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
DURLTest.java30 import java.net.URL;
39 protected URLConnection openConnection(URL u) in openConnection()
45 URL u;
47 URL u1;
49 URL u2;
51 URL u3;
53 URL u4;
55 URL u5;
57 URL u6;
68 u = new URL( in test_ConstructorLjava_lang_String()
[all …]
DJarURLConnectionTest.java28 import java.net.URL;
41 private URL copyAndOpenResourceStream(String jarFile, String inFile) in copyAndOpenResourceStream()
49 return new URL("jar:file:" + file.getPath() + "!/" + inFile); in copyAndOpenResourceStream()
57 URL u = copyAndOpenResourceStream("lf.jar", "swt.dll"); in test_getAttributes()
70 URL u = copyAndOpenResourceStream("lf.jar", "plus.bmp"); in test_getEntryName()
78 URL url = copyAndOpenResourceStream("lf.jar", "foo.jar!/Bugs/HelloWorld.class"); in test_getEntryName()
86 URL u = copyAndOpenResourceStream("lf.jar", "plus.bmp"); in test_getJarEntry()
99 URL url = copyAndOpenResourceStream("lf.jar", "missing"); in test_getJarFile()
121 URL fUrl1 = new URL("jar:file:" + file.getPath() + "!/"); in test_getJarFile()
150 JarURLConnection conn = (JarURLConnection) new URL("jar:file:" in test_getJarFile29()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/
DHttpsURLConnectionTest.java22 import java.net.URL;
50 new MyHttpsURLConnection(new URL("https://www.fortify.net/")); in test_Constructor()
58 URL url = new URL("https://localhost:55555"); in test_getCipherSuite()
66 HttpsURLConnection con = new MyHttpsURLConnection(new URL("https://www.fortify.net/")); in test_getCipherSuite()
74 URL url = new URL("https://localhost:55555"); in test_getLocalCertificates()
82 … HttpsURLConnection con = new MyHttpsURLConnection(new URL("https://www.fortify.net/"), "X.508"); in test_getLocalCertificates()
84 con = new MyHttpsURLConnection(new URL("https://www.fortify.net/"), "X.509"); in test_getLocalCertificates()
105 new URL("https://www.fortify.net/")); in test_getHostnameVerifier()
116 URL url = new URL("https://localhost:55555"); in test_getLocalPrincipal()
124 … HttpsURLConnection con = new MyHttpsURLConnection(new URL("https://www.fortify.net/"), "X.508"); in test_getLocalPrincipal()
[all …]
/libcore/ojluni/src/main/java/sun/misc/
DURLClassPath.java41 import java.net.URL;
80 private ArrayList<URL> path = new ArrayList<URL>();
83 Stack<URL> urls = new Stack<URL>();
107 public URLClassPath(URL[] urls, URLStreamHandlerFactory factory) { in URLClassPath()
117 public URLClassPath(URL[] urls) { in URLClassPath()
144 public synchronized void addURL(URL url) { in addURL()
159 public URL[] getURLs() { in getURLs()
161 return path.toArray(new URL[path.size()]); in getURLs()
174 public URL findResource(String name, boolean check) { in findResource()
177 URL url = loader.findResource(name, check); in findResource()
[all …]
/libcore/ojluni/src/main/java/sun/net/www/protocol/file/
DHandler.java30 import java.net.URL;
45 private String getHost(URL url) { in getHost()
53 protected void parseURL(URL u, String spec, int start, int limit) { in parseURL()
70 public synchronized URLConnection openConnection(URL u) in openConnection()
75 public synchronized URLConnection openConnection(URL u, Proxy p) in openConnection()
88 URL ru; in openConnection()
91 ru = new URL("ftp", host, u.getFile() + in openConnection()
110 protected URLConnection createFileURLConnection(URL u, File file) in createFileURLConnection()
122 protected boolean hostsEqual(URL u1, URL u2) { in hostsEqual()
/libcore/ojluni/src/main/java/sun/net/www/protocol/netdoc/
DHandler.java37 import java.net.URL;
45 static URL base;
51 public synchronized URLConnection openConnection(URL u) in openConnection()
55 URL ru; in openConnection()
68 base = new URL(docurl); in openConnection()
70 ru = new URL(base, file); in openConnection()
81 ru = new URL("file", "~", file); in openConnection()
/libcore/ojluni/src/main/java/java/net/
DURLClassLoader.java32 import java.net.URL;
96 public URLClassLoader(URL[] urls, ClassLoader parent) { in URLClassLoader()
107 URLClassLoader(URL[] urls, ClassLoader parent, in URLClassLoader()
139 public URLClassLoader(URL[] urls) { in URLClassLoader()
150 URLClassLoader(URL[] urls, AccessControlContext acc) { in URLClassLoader()
181 public URLClassLoader(URL[] urls, ClassLoader parent, in URLClassLoader()
227 URL url = getResource(name); in getResourceAsStream()
326 protected void addURL(URL url) { in addURL()
336 public URL[] getURLs() { in getURLs()
381 Manifest man, URL url) {
[all …]
/libcore/support/src/test/java/tests/support/
DSupport_ClassLoader.java19 import java.net.URL;
31 public abstract ClassLoader getClassLoader(URL url, ClassLoader parent); in getClassLoader()
33 public static ClassLoader getInstance(URL url, ClassLoader parent) { in getInstance()
68 public ClassLoader getClassLoader(URL url, ClassLoader parent) { in getClassLoader()
80 public ClassLoader getClassLoader(URL url, ClassLoader parent) { in getClassLoader()
81 return new URLClassLoader(new URL[] { url }, parent); in getClassLoader()
/libcore/ojluni/src/main/java/sun/net/www/protocol/jar/
DHandler.java39 protected java.net.URLConnection openConnection(URL u) in openConnection()
61 protected boolean sameFile(URL u1, URL u2) { in sameFile()
80 URL enclosedURL1 = null, enclosedURL2 = null; in sameFile()
82 enclosedURL1 = new URL(file1.substring(0, sep1)); in sameFile()
83 enclosedURL2 = new URL(file2.substring(0, sep2)); in sameFile()
96 protected int hashCode(URL u) { in hashCode()
109 URL enclosedURL = null; in hashCode()
112 enclosedURL = new URL(fileWithoutEntry); in hashCode()
126 protected void parseURL(URL url, String spec, in parseURL()
166 URL url = null; in parseAbsoluteSpec()
[all …]
/libcore/libart/src/main/java/java/lang/
DVMClassLoader.java21 import java.net.URL;
66 static URL getResource(String name) { in getResource()
68 URL url = urlHandler.getEntryUrlOrNull(name); in getResource()
79 static List<URL> getResources(String name) { in getResources()
80 ArrayList<URL> list = new ArrayList<URL>(); in getResources()
82 URL url = urlHandler.getEntryUrlOrNull(name); in getResources()
/libcore/luni/src/test/java/libcore/net/
DNetworkSecurityPolicyTest.java26 import java.net.URL;
98 URL url = new URL("http://localhost:" + server.getPort() + "/test.txt"); in testCleartextTrafficPolicyWithHttpURLConnection()
111 URL url = new URL("http://localhost:" + server.getPort() + "/test.txt"); in testCleartextTrafficPolicyWithHttpURLConnection()
126 URL url = new URL("ftp://localhost:" + server.getPort() + "/test.txt"); in testCleartextTrafficPolicyWithFtpURLConnection()
139 URL url = new URL("ftp://localhost:" + server.getPort() + "/test.txt"); in testCleartextTrafficPolicyWithFtpURLConnection()
153 URL url = new URL("jar:http://localhost:" + server.getPort() + "/test.jar!/"); in testCleartextTrafficPolicyWithJarHttpURLConnection()
166 URL url = new URL("jar:http://localhost:" + server.getPort() + "/test.jar!/"); in testCleartextTrafficPolicyWithJarHttpURLConnection()
181 URL url = new URL("jar:ftp://localhost:" + server.getPort() + "/test.jar!/"); in testCleartextTrafficPolicyWithJarFtpURLConnection()
194 URL url = new URL("jar:ftp://localhost:" + server.getPort() + "/test.jar!/"); in testCleartextTrafficPolicyWithJarFtpURLConnection()
/libcore/luni/src/test/java/libcore/javax/net/ssl/
DHttpsURLConnectionTest.java22 import java.net.URL;
44 (HttpsURLConnection) new URL(UNRESOLVABLE_HTTPS_URL).openConnection(); in testDefaultHostnameVerifierUsedForNewConnectionsByDefault()
54 connection = (HttpsURLConnection) new URL(UNRESOLVABLE_HTTPS_URL).openConnection(); in testDefaultHostnameVerifierUsedForNewConnectionsByDefault()
62 connection = (HttpsURLConnection) new URL(UNRESOLVABLE_HTTPS_URL).openConnection(); in testDefaultHostnameVerifierUsedForNewConnectionsByDefault()
80 (HttpsURLConnection) new URL(UNRESOLVABLE_HTTPS_URL).openConnection(); in testDefaultSSLSocketFactoryUsedForNewConnectionsByDefault()
90 connection = (HttpsURLConnection) new URL(UNRESOLVABLE_HTTPS_URL).openConnection(); in testDefaultSSLSocketFactoryUsedForNewConnectionsByDefault()
98 connection = (HttpsURLConnection) new URL(UNRESOLVABLE_HTTPS_URL).openConnection(); in testDefaultSSLSocketFactoryUsedForNewConnectionsByDefault()
/libcore/ojluni/src/main/java/sun/net/www/protocol/ftp/
DHandler.java33 import java.net.URL;
47 protected boolean equals(URL u1, URL u2) { in equals()
54 protected java.net.URLConnection openConnection(URL u) in openConnection()
59 protected java.net.URLConnection openConnection(URL u, Proxy p) in openConnection()
/libcore/support/src/test/java/tests/util/
DClassLoaderBuilder.java21 import java.net.URL;
113 List<URL> classpath = new ArrayList<URL>(); in build()
116 return new URLClassLoader(classpath.toArray(new URL[classpath.size()]), bridge); in build()
128 URL manifest = classLoader.getResource(manifestFile); in getApplicationClassPath()
138 private List<URL> classpathToUrls(String propertyName) { in classpathToUrls()
141 List<URL> result = new ArrayList<URL>(); in classpathToUrls()
/libcore/ojluni/src/main/java/sun/net/www/protocol/https/
DAbstractDelegateHttpsURLConnection.java28 import java.net.URL;
48 protected AbstractDelegateHttpsURLConnection(URL url, in AbstractDelegateHttpsURLConnection()
53 protected AbstractDelegateHttpsURLConnection(URL url, Proxy p, in AbstractDelegateHttpsURLConnection()
78 public void setNewClient (URL url) in setNewClient()
94 public void setNewClient (URL url, boolean useCache) in setNewClient()
116 public void setProxiedClient (URL url, String proxyHost, int proxyPort) in setProxiedClient()
136 public void setProxiedClient (URL url, String proxyHost, int proxyPort, in setProxiedClient()
145 protected void proxiedConnect(URL url, String proxyHost, int proxyPort, in proxiedConnect()
189 protected HttpClient getNewHttpClient(URL url, Proxy p, int connectTimeout) in getNewHttpClient()
197 protected HttpClient getNewHttpClient(URL url, Proxy p, int connectTimeout, in getNewHttpClient()
/libcore/luni/src/test/java/tests/java/security/
DSecureClassLoaderTest.java29 import java.net.URL;
170 URL[] urls = new URL[] { new URL("http://localhost") }; in testSecureClassLoaderClassLoader()
182 URL url = new URL("http://localhost"); in testGetPermissions()
/libcore/ojluni/src/main/java/java/security/
DCodeSource.java29 import java.net.URL;
44 public CodeSource(URL url, java.security.cert.Certificate certs[]) { } in CodeSource()
46 public CodeSource(URL url, CodeSigner[] signers) { } in CodeSource()
48 public final URL getLocation() { return null; } in getLocation()
/libcore/ojluni/src/main/java/java/lang/
DClassLoader.java34 import java.net.URL;
785 public URL getResource(String name) { in getResource()
786 URL url; in getResource()
824 public Enumeration<URL> getResources(String name) throws IOException { in getResources()
848 protected URL findResource(String name) { in findResource()
869 protected Enumeration<URL> findResources(String name) throws IOException { in findResources()
906 public static URL getSystemResource(String name) { in getSystemResource()
934 public static Enumeration<URL> getSystemResources(String name) in getSystemResources()
947 private static URL getBootstrapResource(String name) { in getBootstrapResource()
954 private static Enumeration<URL> getBootstrapResources(String name) in getBootstrapResources()
[all …]
/libcore/ojluni/src/main/java/sun/net/
DProgressEvent.java28 import java.net.URL;
38 private URL url;
53 …public ProgressEvent(ProgressSource source, URL url, String method, String contentType, ProgressSo… in ProgressEvent()
66 public URL getURL() in getURL()

1234567