Home
last modified time | relevance | path

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

123456

/libcore/luni/src/test/java/libcore/java/net/
DURLTest.java28 import java.net.URL;
45 URL url = new URL("http://username:password@host:8080/directory/file?query#ref"); in testUrlParts()
59 URL url = new URL("http://www.google.com:80/example?language[id]=2"); in testExplicitPort()
75 URL urlByHostName = new URL("http://localhost/foo?bar=baz#quux"); in testEqualsDoesNotDoHostnameResolution()
76 URL urlByAddress = new URL("http://" + address + "/foo?bar=baz#quux"); in testEqualsDoesNotDoHostnameResolution()
83 assertEquals(new URL("HTTP://localhost/foo?bar=baz#quux"), in testEqualsCaseMapping()
84 new URL("HTTP://localhost/foo?bar=baz#quux")); in testEqualsCaseMapping()
85 assertTrue(new URL("http://localhost/foo?bar=baz#quux").equals( in testEqualsCaseMapping()
86 new URL("http://LOCALHOST/foo?bar=baz#quux"))); in testEqualsCaseMapping()
87 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;
47 URL[] u = new URL[0]; in test_Constructor$Ljava_net_URL()
53 URL [] urls = {new URL("http://foo.com/foo"), in test_Constructor$Ljava_net_URL()
54 new URL("jar:file://foo.jar!/foo.c"), in test_Constructor$Ljava_net_URL()
55 new URL("ftp://foo1/foo2/foo.c")}; in test_Constructor$Ljava_net_URL()
68 new URLClassLoader(new URL[] { null }); in test_Constructor$Ljava_net_URL()
100 URL[] urls = new URL[2]; in test_findResourcesLjava_lang_String()
101 urls[0] = new URL("file://" + tmpDir.getAbsolutePath() + "/"); in test_findResourcesLjava_lang_String()
102 urls[1] = new URL("file://" + subDir.getAbsolutePath() + "/"); in test_findResourcesLjava_lang_String()
105 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/annotations/hiddenapi/sun/misc/
DURLClassPath.java35 java.net.URL[] urls, in URLClassPath()
41 public URLClassPath(java.net.URL[] urls) { in URLClassPath()
45 public URLClassPath(java.net.URL[] urls, java.security.AccessControlContext acc) { in URLClassPath()
53 public synchronized void addURL(java.net.URL url) { in addURL()
57 public java.net.URL[] getURLs() { in getURLs()
61 public java.net.URL findResource(java.lang.String name, boolean check) { in findResource()
69 public java.util.Enumeration<java.net.URL> findResources(java.lang.String name, boolean check) { in findResources()
94 private java.net.URL[] getLookupCacheURLs(java.lang.ClassLoader loader) { in getLookupCacheURLs()
132 private sun.misc.URLClassPath.Loader getLoader(java.net.URL url) throws java.io.IOException { in getLoader()
136 private void push(java.net.URL[] us) { in push()
[all …]
/libcore/ojluni/src/main/java/sun/misc/
DURLClassPath.java41 import java.net.URL;
90 private ArrayList<URL> path = new ArrayList<URL>();
93 Stack<URL> urls = new Stack<URL>();
124 public URLClassPath(URL[] urls, in URLClassPath()
144 public URLClassPath(URL[] urls) { in URLClassPath()
148 public URLClassPath(URL[] urls, AccessControlContext acc) { in URLClassPath()
175 public synchronized void addURL(URL url) { in addURL()
196 public URL[] getURLs() { in getURLs()
198 return path.toArray(new URL[path.size()]); in getURLs()
211 public URL findResource(String name, boolean check) { in findResource()
[all …]
/libcore/ojluni/annotations/hiddenapi/java/net/
DURLClassLoader.java33 public URLClassLoader(java.net.URL[] urls, java.lang.ClassLoader parent) { in URLClassLoader()
38 java.net.URL[] urls, in URLClassLoader()
44 public URLClassLoader(java.net.URL[] urls) { in URLClassLoader()
48 URLClassLoader(java.net.URL[] urls, java.security.AccessControlContext acc) { in URLClassLoader()
53 java.net.URL[] urls, in URLClassLoader()
67 protected void addURL(java.net.URL url) { in addURL()
71 public java.net.URL[] getURLs() { in getURLs()
81 java.lang.String pkgname, java.util.jar.Manifest man, java.net.URL url) { in getAndVerifyPackage()
86 java.lang.String pkgname, java.util.jar.Manifest man, java.net.URL url) { in definePackageInternal()
96 java.lang.String name, java.util.jar.Manifest man, java.net.URL url) in definePackage()
[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()
186 public URLClassLoader(URL[] urls, ClassLoader parent, in URLClassLoader()
232 URL url = getResource(name); in getResourceAsStream()
331 protected void addURL(URL url) { in addURL()
341 public URL[] getURLs() { in getURLs()
392 Manifest man, URL url) { in getAndVerifyPackage()
417 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()
127 protected void parseURL(URL url, String spec, in parseURL()
167 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/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/libcore/net/
DNetworkSecurityPolicyTest.java27 import java.net.URL;
100 URL url = new URL("http://localhost:" + server.getPort() + "/test.txt"); in testCleartextTrafficPolicyWithHttpURLConnection()
113 URL url = new URL("http://localhost:" + server.getPort() + "/test.txt"); in testCleartextTrafficPolicyWithHttpURLConnection()
128 URL url = new URL("ftp://localhost:" + server.getPort() + "/test.txt"); in testCleartextTrafficPolicyWithFtpURLConnection()
141 URL url = new URL("ftp://localhost:" + server.getPort() + "/test.txt"); in testCleartextTrafficPolicyWithFtpURLConnection()
155 URL url = new URL("jar:http://localhost:" + server.getPort() + "/test.jar!/"); in testCleartextTrafficPolicyWithJarHttpURLConnection()
168 URL url = new URL("jar:http://localhost:" + server.getPort() + "/test.jar!/"); in testCleartextTrafficPolicyWithJarHttpURLConnection()
183 URL url = new URL("jar:ftp://localhost:" + server.getPort() + "/test.jar!/"); in testCleartextTrafficPolicyWithJarFtpURLConnection()
196 URL url = new URL("jar:ftp://localhost:" + server.getPort() + "/test.jar!/"); in testCleartextTrafficPolicyWithJarFtpURLConnection()
/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/ojluni/src/main/java/java/security/
DCodeSource.java29 import java.net.URL;
51 private URL location;
53 public CodeSource(URL url, java.security.cert.Certificate certs[]) { in CodeSource()
57 public CodeSource(URL url, CodeSigner[] signers) { in CodeSource()
61 public final URL getLocation() { in getLocation()
/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/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/javax/crypto/
DJceSecurity.java31 import java.net.URL;
155 static CryptoPermissions verifyExemptJar(URL codeBase) throws Exception { in verifyExemptJar()
166 static void verifyProviderJar(URL codeBase) throws Exception { in verifyProviderJar()
195 URL providerURL = getCodeBase(p.getClass()); in getVerificationResult()
217 private static final URL NULL_URL;
221 NULL_URL = new URL("http://null.sun.com/");
228 private static final Map<Class<?>, URL> codeBaseCacheRef =
234 static URL getCodeBase(final Class<?> clazz) { in getCodeBase()
236 URL url = codeBaseCacheRef.get(clazz); in getCodeBase()
238 url = AccessController.doPrivileged(new PrivilegedAction<URL>() { in getCodeBase()
[all …]
/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()

123456