Home
last modified time | relevance | path

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

123456

/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;
35 for (Field field : URL.class.getDeclaredFields()) { in setUp()
50 URL.setURLStreamHandlerFactory(oldFactory); in tearDown()
57 URL.setURLStreamHandlerFactory(shf); in testCreateURLStreamHandler()
58 URL url = new URL("http://android.com/"); in testCreateURLStreamHandler()
64 URL.setURLStreamHandlerFactory(shf); in testCreateURLStreamHandler()
75 URL.setURLStreamHandlerFactory(null); in testCreateURLStreamHandler()
89 URL.setURLStreamHandlerFactory(oldFactory); in testInstallCustomProtocolHandler()
93 URLConnection connection = new URL("http://android.com/").openConnection(); in testInstallCustomProtocolHandler()
103 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;
57 new MyHttpsURLConnection(new URL("https://www.fortify.net/")); in test_Constructor()
65 URL url = new URL("https://localhost:55555"); in test_getCipherSuite()
73 HttpsURLConnection con = new MyHttpsURLConnection(new URL("https://www.fortify.net/")); in test_getCipherSuite()
81 URL url = new URL("https://localhost:55555"); in test_getLocalCertificates()
89 … HttpsURLConnection con = new MyHttpsURLConnection(new URL("https://www.fortify.net/"), "X.508"); in test_getLocalCertificates()
91 con = new MyHttpsURLConnection(new URL("https://www.fortify.net/"), "X.509"); in test_getLocalCertificates()
112 new URL("https://www.fortify.net/")); in test_getHostnameVerifier()
123 URL url = new URL("https://localhost:55555"); in test_getLocalPrincipal()
131 … 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/java/net/
DURLClassLoader.java99 public URLClassLoader(URL[] urls, ClassLoader parent) { in URLClassLoader()
110 URLClassLoader(URL[] urls, ClassLoader parent, in URLClassLoader()
143 public URLClassLoader(URL[] urls) { in URLClassLoader()
154 URLClassLoader(URL[] urls, AccessControlContext acc) { in URLClassLoader()
185 public URLClassLoader(URL[] urls, ClassLoader parent, in URLClassLoader()
231 URL url = getResource(name); in getResourceAsStream()
330 protected void addURL(URL url) { in addURL()
340 public URL[] getURLs() { in getURLs()
391 Manifest man, URL url) { in getAndVerifyPackage()
416 private void definePackageInternal(String pkgname, Manifest man, URL url) in definePackageInternal()
[all …]
/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 …]
DJarFileFactory.java30 import java.net.URL;
49 private static final HashMap<JarFile, URL> urlCache = new HashMap<>();
60 URL u; in getConnection()
70 public JarFile get(URL url) throws IOException { in get()
74 JarFile get(URL url, boolean useCaches) throws IOException { in get()
114 URL urlRemoved = urlCache.remove(jarFile); in close()
120 private JarFile getCachedJarFile(URL url) { in getCachedJarFile()
/libcore/libart/src/main/java/java/lang/
DVMClassLoader.java22 import java.net.URL;
65 static URL getResource(String name) { in getResource()
67 URL url = urlHandler.getEntryUrlOrNull(name); in getResource()
78 static List<URL> getResources(String name) { in getResources()
79 ArrayList<URL> list = new ArrayList<URL>(); in getResources()
81 URL url = urlHandler.getEntryUrlOrNull(name); in getResources()
/libcore/ojluni/src/main/java/sun/net/www/protocol/ftp/
DHandler.java34 import java.net.URL;
43 protected boolean equals(URL u1, URL u2) { in equals()
50 protected java.net.URLConnection openConnection(URL u) in openConnection()
55 protected java.net.URLConnection openConnection(URL u, Proxy p) in openConnection()
/libcore/support/src/test/java/tests/support/
DSupport_ClassLoader.java19 import java.net.URL;
29 public abstract ClassLoader getClassLoader(URL url, ClassLoader parent); in getClassLoader()
31 public static ClassLoader getInstance(URL url, ClassLoader parent) { in getInstance()
56 public ClassLoader getClassLoader(URL url, ClassLoader parent) { in getClassLoader()
57 return new URLClassLoader(new URL[] { url }, parent); in getClassLoader()
/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()
831 public Enumeration<URL> getResources(String name) throws IOException { in getResources()
833 Enumeration<URL>[] tmp = (Enumeration<URL>[]) new Enumeration<?>[2]; in getResources()
856 protected URL findResource(String name) { in findResource()
877 protected Enumeration<URL> findResources(String name) throws IOException { in findResources()
916 public static URL getSystemResource(String name) { in getSystemResource()
944 public static Enumeration<URL> getSystemResources(String name) in getSystemResources()
957 private static URL getBootstrapResource(String name) { in getBootstrapResource()
[all …]
/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/luni/src/test/java/libcore/net/
DNetworkSecurityPolicyTest.java26 import java.net.URL;
99 URL url = new URL("http://localhost:" + server.getPort() + "/test.txt"); in testCleartextTrafficPolicyWithHttpURLConnection()
112 URL url = new URL("http://localhost:" + server.getPort() + "/test.txt"); in testCleartextTrafficPolicyWithHttpURLConnection()
127 URL url = new URL("ftp://localhost:" + server.getPort() + "/test.txt"); in testCleartextTrafficPolicyWithFtpURLConnection()
140 URL url = new URL("ftp://localhost:" + server.getPort() + "/test.txt"); in testCleartextTrafficPolicyWithFtpURLConnection()
154 URL url = new URL("jar:http://localhost:" + server.getPort() + "/test.jar!/"); in testCleartextTrafficPolicyWithJarHttpURLConnection()
167 URL url = new URL("jar:http://localhost:" + server.getPort() + "/test.jar!/"); in testCleartextTrafficPolicyWithJarHttpURLConnection()
182 URL url = new URL("jar:ftp://localhost:" + server.getPort() + "/test.jar!/"); in testCleartextTrafficPolicyWithJarFtpURLConnection()
195 URL url = new URL("jar:ftp://localhost:" + server.getPort() + "/test.jar!/"); in testCleartextTrafficPolicyWithJarFtpURLConnection()
/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/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/javax/crypto/
DJceSecurity.java31 import java.net.URL;
149 static CryptoPermissions verifyExemptJar(URL codeBase) throws Exception { in verifyExemptJar()
160 static void verifyProviderJar(URL codeBase) throws Exception { in verifyProviderJar()
189 URL providerURL = getCodeBase(p.getClass()); in getVerificationResult()
211 private static final URL NULL_URL;
215 NULL_URL = new URL("http://null.sun.com/");
222 private static final Map<Class<?>, URL> codeBaseCacheRef =
228 static URL getCodeBase(final Class<?> clazz) { in getCodeBase()
230 URL url = codeBaseCacheRef.get(clazz); in getCodeBase()
232 url = AccessController.doPrivileged(new PrivilegedAction<URL>() { in getCodeBase()
[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()

123456