/libcore/luni/src/test/java/libcore/java/net/ |
D | URLTest.java | 45 URL url = new URL("http://username:password@host:8080/directory/file?query#ref"); in testUrlParts() local 46 assertEquals("http", url.getProtocol()); in testUrlParts() 47 assertEquals("username:password@host:8080", url.getAuthority()); in testUrlParts() 48 assertEquals("username:password", url.getUserInfo()); in testUrlParts() 49 assertEquals("host", url.getHost()); in testUrlParts() 50 assertEquals(8080, url.getPort()); in testUrlParts() 51 assertEquals(80, url.getDefaultPort()); in testUrlParts() 52 assertEquals("/directory/file?query", url.getFile()); in testUrlParts() 53 assertEquals("/directory/file", url.getPath()); in testUrlParts() 54 assertEquals("query", url.getQuery()); in testUrlParts() [all …]
|
D | OldURLStreamHandlerTest.java | 108 URL url = new URL("http://test.org"); in test_parseURLLjava_net_URLLjava_lang_StringII() local 111 handler.parseURL(url, str, 0, str.length()); in test_parseURLLjava_net_URLLjava_lang_StringII() 134 URL url = new URL("http://test.org"); in test_setURL1() local 137 handler.setURL(url, "http", "localhost", 80, "foo.c", "ref"); in test_setURL1() 144 URL url = new URL("http://test.org"); in test_setURL2() local 147 handler.setURL(url, "http", "localhost", 80, "authority", in test_setURL2() 159 for(URL url : urls) { in test_toExternalForm() 160 assertEquals("Test case for " + url.toString(), in test_toExternalForm() 161 url.toString(), handler.toExternalForm(url)); in test_toExternalForm() 204 @Override public void parseURL(URL url, String spec, int start, int limit) { in parseURL() argument [all …]
|
D | OldURLClassLoaderTest.java | 154 URL url = file.toURL(); in test_getPermissions_fileURLConnection_doesNotThrow() local 155 TestURLClassLoader urlClassLoader = new TestURLClassLoader(new URL[] { url }); in test_getPermissions_fileURLConnection_doesNotThrow() 156 CodeSource codeSource = new CodeSource(url, new Certificate[0]); in test_getPermissions_fileURLConnection_doesNotThrow() 200 public void addURL(URL url) { in addURL() argument 201 super.addURL(url); in addURL() 206 URL url) in definePackage() argument 208 return super.definePackage(name, man, url); in definePackage() 284 String url; in getURLClassLoader() local 287 url = "file:" + path; in getURLClassLoader() 289 url = path; in getURLClassLoader() [all …]
|
D | OldJarURLConnectionTest.java | 132 URL url = new URL("jar:file:///bar.jar!/foo.jar!/Bugs/HelloWorld.class"); in test_getEntryName() local 133 …assertEquals("foo.jar!/Bugs/HelloWorld.class",((JarURLConnection)url.openConnection()).getEntryNam… in test_getEntryName() 160 URL url = createContent("lf.jar", "missing"); in test_getJarFile() local 162 JarURLConnection connection = (JarURLConnection) url.openConnection(); in test_getJarFile() 229 URL url = new URL("jar:file:" + file.getPath() + "!/HasAttributes.txt"); in test_setUseCaches() local 231 JarURLConnection connection = (JarURLConnection) url.openConnection(); in test_setUseCaches() 261 URL url = new URL("jar:file:///bar.jar!/foo.jar!/Bugs/HelloWorld.class"); in test_getJarFileURL() local 262 String jarFileUrl = ((JarURLConnection) url.openConnection()).getJarFileURL().toString(); in test_getJarFileURL() 301 URL url = new URL("jar:file:" + jarFileName + "!/" + entry); in test_getInputStream_DeleteJarFileUsingURLConnection() local 302 URLConnection conn = url.openConnection(); in test_getInputStream_DeleteJarFileUsingURLConnection() [all …]
|
/libcore/ojluni/src/main/java/sun/misc/ |
D | URLClassPath.java | 175 public synchronized void addURL(URL url) { in addURL() argument 179 if (url == null || path.contains(url)) in addURL() 182 urls.add(0, url); in addURL() 183 path.add(url); in addURL() 215 URL url = loader.findResource(name, check); in findResource() local 216 if (url != null) { in findResource() 217 return url; in findResource() 259 private URL url = null; in findResources() local 262 if (url != null) { in findResources() 267 url = loader.findResource(name, check); in findResources() [all …]
|
D | FileURLMapper.java | 45 URL url; field in FileURLMapper 48 public FileURLMapper (URL url) { in FileURLMapper() argument 49 this.url = url; in FileURLMapper() 61 String host = url.getHost(); in getPath() 63 path = url.getFile(); in getPath()
|
/libcore/ojluni/src/main/java/sun/net/www/protocol/jar/ |
D | JarFileFactory.java | 70 public JarFile get(URL url) throws IOException { in get() argument 71 return get(url, true); in get() 74 JarFile get(URL url, boolean useCaches) throws IOException { in get() argument 81 result = getCachedJarFile(url); in get() 84 local_result = URLJarFile.getJarFile(url, this); in get() 86 result = getCachedJarFile(url); in get() 88 fileCache.put(URLUtil.urlNoFragString(url), local_result); in get() 89 urlCache.put(local_result, url); in get() 99 result = URLJarFile.getJarFile(url, this); in get() 102 throw new FileNotFoundException(url.toString()); in get() [all …]
|
D | URLJarFile.java | 64 static JarFile getJarFile(URL url) throws IOException { in getJarFile() argument 65 return getJarFile(url, null); in getJarFile() 68 … static JarFile getJarFile(URL url, URLJarFileCloseController closeController) throws IOException { in getJarFile() argument 69 if (isFileURL(url)) in getJarFile() 70 return new URLJarFile(url, closeController); in getJarFile() 72 return retrieve(url, closeController); in getJarFile() 93 private URLJarFile(URL url, URLJarFileCloseController closeController) throws IOException { in URLJarFile() argument 94 super(ParseUtil.decode(url.getFile())); in URLJarFile() 98 private static boolean isFileURL(URL url) { in isFileURL() argument 99 if (url.getProtocol().equalsIgnoreCase("file")) { in isFileURL() [all …]
|
D | Handler.java | 127 protected void parseURL(URL url, String spec, in parseURL() argument 137 file = url.getFile(); in parseURL() 153 file = parseContextSpec(url, spec); in parseURL() 163 setURL(url, "jar", "", -1, file, ref); in parseURL() 167 URL url = null; in parseAbsoluteSpec() local 176 url = new URL(innerSpec); in parseAbsoluteSpec() 184 private String parseContextSpec(URL url, String spec) { in parseContextSpec() argument 185 String ctxFile = url.getFile(); in parseContextSpec() 192 url + in parseContextSpec() 203 url); in parseContextSpec()
|
/libcore/support/src/test/java/tests/support/ |
D | Support_GetLocal.java | 37 public static File getLocalFile(String url) throws IOException, in getLocalFile() argument 39 url = Support_Resources.RESOURCE_PACKAGE + url; in getLocalFile() 40 File temp = cache.get(url); in getLocalFile() 42 InputStream in = Support_GetLocal.class.getResourceAsStream(url); in getLocalFile() 53 cache.put(url, temp); in getLocalFile() 58 public static File getExternalLocalFile(String url) throws IOException, in getExternalLocalFile() argument 60 File temp = cache.get(url); in getExternalLocalFile() 62 InputStream in = new URL(url).openStream(); in getExternalLocalFile() 73 cache.put(url, temp); in getExternalLocalFile() 78 static ByteArrayInputStream getStream(String url) throws IOException, in getStream() argument [all …]
|
D | Support_ClassLoader.java | 29 public abstract ClassLoader getClassLoader(URL url, ClassLoader parent); in getClassLoader() argument 31 public static ClassLoader getInstance(URL url, ClassLoader parent) { in getInstance() argument 44 return factory.getClassLoader(url, parent); in getInstance() 56 public ClassLoader getClassLoader(URL url, ClassLoader parent) { in getClassLoader() argument 57 return new URLClassLoader(new URL[] { url }, parent); in getClassLoader()
|
/libcore/ojluni/src/main/java/sun/net/util/ |
D | URLUtil.java | 44 public static String urlNoFragString(URL url) { in urlNoFragString() argument 47 String protocol = url.getProtocol(); in urlNoFragString() 55 String host = url.getHost(); in urlNoFragString() 61 int port = url.getPort(); in urlNoFragString() 65 port = url.getDefaultPort(); in urlNoFragString() 72 String file = url.getFile(); in urlNoFragString()
|
/libcore/ojluni/src/main/java/java/net/ |
D | URLClassLoader.java | 232 URL url = getResource(name); in getResourceAsStream() local 234 if (url == null) { in getResourceAsStream() 237 URLConnection urlc = url.openConnection(); in getResourceAsStream() 331 protected void addURL(URL url) { in addURL() argument 332 ucp.addURL(url); in addURL() 392 Manifest man, URL url) { in getAndVerifyPackage() argument 398 if (!pkg.isSealed(url)) { in getAndVerifyPackage() 417 private void definePackageInternal(String pkgname, Manifest man, URL url) in definePackageInternal() argument 419 if (getAndVerifyPackage(pkgname, man, url) == null) { in definePackageInternal() 422 definePackage(pkgname, man, url); in definePackageInternal() [all …]
|
D | JarURLConnection.java | 156 protected JarURLConnection(URL url) throws MalformedURLException { in JarURLConnection() argument 157 super(url); in JarURLConnection() 158 parseSpecs(url); in JarURLConnection() 164 private void parseSpecs(URL url) throws MalformedURLException { in parseSpecs() argument 165 String spec = url.getFile(); in parseSpecs()
|
/libcore/ojluni/src/main/java/sun/net/ |
D | ProgressSource.java | 39 private URL url; field in ProgressSource 62 public ProgressSource(URL url, String method) { in ProgressSource() argument 63 this(url, method, -1); in ProgressSource() 69 public ProgressSource(URL url, String method, long expected) { in ProgressSource() argument 70 this.url = url; in ProgressSource() 101 return url; in getURL() 207 return getClass().getName() + "[url=" + url + ", method=" + method + ", state=" + state in toString()
|
D | ProgressEvent.java | 38 private URL url; field in ProgressEvent 53 …public ProgressEvent(ProgressSource source, URL url, String method, String contentType, ProgressSo… in ProgressEvent() argument 55 this.url = url; in ProgressEvent() 68 return url; in getURL() 110 return getClass().getName() + "[url=" + url + ", method=" + method + ", state=" + state in toString()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
D | HttpsURLConnectionTest.java | 65 URL url = new URL("https://localhost:55555"); in test_getCipherSuite() local 66 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); in test_getCipherSuite() 81 URL url = new URL("https://localhost:55555"); in test_getLocalCertificates() local 82 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); in test_getLocalCertificates() 123 URL url = new URL("https://localhost:55555"); in test_getLocalPrincipal() local 124 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); in test_getLocalPrincipal() 141 URL url = new URL("https://localhost:55555"); in test_getPeerPrincipal() local 142 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); in test_getPeerPrincipal() 164 URL url = new URL("https://localhost:55555"); in test_getServerCertificates() local 165 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); in test_getServerCertificates() [all …]
|
/libcore/luni/src/test/java/libcore/libcore/net/ |
D | NetworkSecurityPolicyTest.java | 100 URL url = new URL("http://localhost:" + server.getPort() + "/test.txt"); in testCleartextTrafficPolicyWithHttpURLConnection() local 102 url.openConnection().getContent(); in testCleartextTrafficPolicyWithHttpURLConnection() 113 URL url = new URL("http://localhost:" + server.getPort() + "/test.txt"); in testCleartextTrafficPolicyWithHttpURLConnection() local 115 url.openConnection().getContent(); in testCleartextTrafficPolicyWithHttpURLConnection() 128 URL url = new URL("ftp://localhost:" + server.getPort() + "/test.txt"); in testCleartextTrafficPolicyWithFtpURLConnection() local 130 url.openConnection().getContent(); in testCleartextTrafficPolicyWithFtpURLConnection() 141 URL url = new URL("ftp://localhost:" + server.getPort() + "/test.txt"); in testCleartextTrafficPolicyWithFtpURLConnection() local 143 url.openConnection().getContent(); in testCleartextTrafficPolicyWithFtpURLConnection() 155 URL url = new URL("jar:http://localhost:" + server.getPort() + "/test.jar!/"); in testCleartextTrafficPolicyWithJarHttpURLConnection() local 157 ((JarURLConnection) url.openConnection()).getManifest(); in testCleartextTrafficPolicyWithJarHttpURLConnection() [all …]
|
/libcore/ojluni/src/main/java/java/sql/ |
D | DriverManager.java | 188 public static Connection getConnection(String url, in getConnection() argument 190 return (getConnection(url, info, Reflection.getCallerClass())); in getConnection() 207 public static Connection getConnection(String url, in getConnection() argument 218 return (getConnection(url, info, Reflection.getCallerClass())); in getConnection() 232 public static Connection getConnection(String url) in getConnection() argument 236 return (getConnection(url, info, Reflection.getCallerClass())); in getConnection() 251 public static Driver getDriver(String url) in getDriver() argument 254 println("DriverManager.getDriver(\"" + url + "\")"); in getDriver() 265 if(aDriver.driver.acceptsURL(url)) { in getDriver() 549 String url, java.util.Properties info, Class<?> caller) throws SQLException { in getConnection() argument [all …]
|
D | Driver.java | 82 Connection connect(String url, java.util.Properties info) in connect() argument 96 boolean acceptsURL(String url) throws SQLException; in acceptsURL() argument 118 DriverPropertyInfo[] getPropertyInfo(String url, java.util.Properties info) in getPropertyInfo() argument
|
/libcore/libart/src/main/java/java/lang/ |
D | VMClassLoader.java | 67 URL url = urlHandler.getEntryUrlOrNull(name); in getResource() local 68 if (url != null) { in getResource() 69 return url; in getResource() 81 URL url = urlHandler.getEntryUrlOrNull(name); in getResources() local 82 if (url != null) { in getResources() 83 list.add(url); in getResources()
|
/libcore/luni/src/test/java/libcore/java/net/customstreamhandler/http/ |
D | Handler.java | 30 @Override protected URLConnection openConnection(URL url) throws IOException { in openConnection() argument 31 return new HandlerURLConnection(url); in openConnection() 35 protected HandlerURLConnection(URL url) { in HandlerURLConnection() argument 36 super(url); in HandlerURLConnection()
|
/libcore/ojluni/src/main/java/java/security/ |
D | CodeSource.java | 53 public CodeSource(URL url, java.security.cert.Certificate certs[]) { in CodeSource() argument 54 this.location = url; in CodeSource() 57 public CodeSource(URL url, CodeSigner[] signers) { in CodeSource() argument 58 this.location = url; in CodeSource()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/ |
D | JarURLConnectionTest.java | 78 URL url = copyAndOpenResourceStream("lf.jar", "foo.jar!/Bugs/HelloWorld.class"); in test_getEntryName() local 79 …assertEquals("foo.jar!/Bugs/HelloWorld.class", ((JarURLConnection) url.openConnection()).getEntryN… in test_getEntryName() 99 URL url = copyAndOpenResourceStream("lf.jar", "missing"); in test_getJarFile() local 102 connection = (JarURLConnection) url.openConnection(); in test_getJarFile() 161 URL url = new URL("jar:file:" + file.getPath() + "!/HasAttributes.txt"); in test_setUseCaches() local 163 JarURLConnection connection = (JarURLConnection) url.openConnection(); in test_setUseCaches() 190 URL url = new URL("jar:file:///bar.jar!/foo.jar!/Bugs/HelloWorld.class"); in test_getJarFileURL() local 191 …assertEquals("file:///bar.jar", ((JarURLConnection) url.openConnection()).getJarFileURL().toString… in test_getJarFileURL() 219 URL url = new URL("jar:file:" + file.getAbsolutePath() + "!/entry.txt"); in test_getInputStream_DeleteJarFileUsingURLConnection() local 220 URLConnection conn = url.openConnection(); in test_getInputStream_DeleteJarFileUsingURLConnection() [all …]
|
/libcore/ojluni/src/main/java/sun/net/www/protocol/ftp/ |
D | FtpURLConnection.java | 170 public FtpURLConnection(URL url) throws IOException { in FtpURLConnection() argument 171 this(url, null); in FtpURLConnection() 179 FtpURLConnection(URL url, Proxy p) throws IOException { in FtpURLConnection() argument 180 super(url); in FtpURLConnection() 182 host = url.getHost(); in FtpURLConnection() 183 port = url.getPort(); in FtpURLConnection() 184 String userInfo = url.getUserInfo(); in FtpURLConnection() 189 + url.getProtocol() + "://" + host in FtpURLConnection() 190 + ((url.getPort() >= 0) ? (":" + url.getPort()) : "")); in FtpURLConnection() 242 URI uri = sun.net.www.ParseUtil.toURI(url); in connect() [all …]
|