/libcore/luni/src/test/java/libcore/java/net/ |
D | URLTest.java | 33 URL url = new URL("http://username:password@host:8080/directory/file?query#ref"); in testUrlParts() local 34 assertEquals("http", url.getProtocol()); in testUrlParts() 35 assertEquals("username:password@host:8080", url.getAuthority()); in testUrlParts() 36 assertEquals("username:password", url.getUserInfo()); in testUrlParts() 37 assertEquals("host", url.getHost()); in testUrlParts() 38 assertEquals(8080, url.getPort()); in testUrlParts() 39 assertEquals(80, url.getDefaultPort()); in testUrlParts() 40 assertEquals("/directory/file?query", url.getFile()); in testUrlParts() 41 assertEquals("/directory/file", url.getPath()); in testUrlParts() 42 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 …]
|
/libcore/ojluni/src/main/java/sun/net/www/protocol/http/ |
D | HttpCallerInfo.java | 47 final public URL url; field in HttpCallerInfo 57 this.url = old.url; in HttpCallerInfo() 70 public HttpCallerInfo(URL url) { in HttpCallerInfo() argument 71 this.url= url; in HttpCallerInfo() 73 host = url.getHost(); in HttpCallerInfo() 75 int p = url.getPort(); in HttpCallerInfo() 77 port = url.getDefaultPort(); in HttpCallerInfo() 84 ia = InetAddress.getByName(url.getHost()); in HttpCallerInfo() 90 protocol = url.getProtocol(); in HttpCallerInfo() 98 public HttpCallerInfo(URL url, String host, int port) { in HttpCallerInfo() argument [all …]
|
D | AuthenticationInfo.java | 215 public AuthenticationInfo(char type, AuthScheme authScheme, URL url, String realm) { in AuthenticationInfo() argument 218 this.protocol = url.getProtocol().toLowerCase(); in AuthenticationInfo() 219 this.host = url.getHost().toLowerCase(); in AuthenticationInfo() 220 this.port = url.getPort(); in AuthenticationInfo() 222 this.port = url.getDefaultPort(); in AuthenticationInfo() 226 String urlPath = url.getPath(); in AuthenticationInfo() 257 static AuthenticationInfo getServerAuth(URL url) { in getServerAuth() argument 258 int port = url.getPort(); in getServerAuth() 260 port = url.getDefaultPort(); in getServerAuth() 262 String key = SERVER_AUTHENTICATION + ":" + url.getProtocol().toLowerCase() in getServerAuth() [all …]
|
D | HttpURLConnection.java | 388 final URL url, in privilegedRequestPasswordAuthentication() argument 394 logger.finest("Requesting Authentication: host =" + host + " url = " + url); in privilegedRequestPasswordAuthentication() 398 prompt, scheme, url, authType); in privilegedRequestPasswordAuthentication() 521 int port = url.getPort(); 522 String host = url.getHost(); 523 if (port != -1 && port != url.getDefaultPort()) { 564 AuthenticationInfo sauth = AuthenticationInfo.getServerAuth(url); 567 requests.setIfNotSet(sauth.getHeaderName(), sauth.getHeaderValue(url,method)); 630 setProxiedClient(url, proxyHost, proxyPort); 632 setNewClient (url); [all …]
|
/libcore/ojluni/src/main/java/sun/net/www/protocol/https/ |
D | AbstractDelegateHttpsURLConnection.java | 48 protected AbstractDelegateHttpsURLConnection(URL url, in AbstractDelegateHttpsURLConnection() argument 50 this(url, null, handler); in AbstractDelegateHttpsURLConnection() 53 protected AbstractDelegateHttpsURLConnection(URL url, Proxy p, in AbstractDelegateHttpsURLConnection() argument 55 super(url, p, handler); in AbstractDelegateHttpsURLConnection() 78 public void setNewClient (URL url) in setNewClient() argument 80 setNewClient (url, false); in setNewClient() 94 public void setNewClient (URL url, boolean useCache) in setNewClient() argument 97 url, in setNewClient() 116 public void setProxiedClient (URL url, String proxyHost, int proxyPort) in setProxiedClient() argument 118 setProxiedClient(url, proxyHost, proxyPort, false); in setProxiedClient() [all …]
|
D | HttpsClient.java | 229 private HttpsClient(SSLSocketFactory sf, URL url) 234 this(sf, url, (String)null, -1); 241 HttpsClient(SSLSocketFactory sf, URL url, String proxyHost, int proxyPort) 243 this(sf, url, proxyHost, proxyPort, -1); 250 HttpsClient(SSLSocketFactory sf, URL url, String proxyHost, int proxyPort, 253 this(sf, url, 262 HttpsClient(SSLSocketFactory sf, URL url, Proxy proxy, 269 this.host = url.getHost(); 270 this.url = url; 271 port = url.getPort(); [all …]
|
/libcore/ojluni/src/main/java/sun/misc/ |
D | URLClassPath.java | 144 public synchronized void addURL(URL url) { in addURL() argument 148 if (url == null || path.contains(url)) in addURL() 151 urls.add(0, url); in addURL() 152 path.add(url); in addURL() 177 URL url = loader.findResource(name, check); in findResource() local 178 if (url != null) { in findResource() 179 return url; in findResource() 219 private URL url = null; in findResources() 222 if (url != null) { in findResources() 227 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/http/ |
D | HttpClient.java | 118 protected URL url; field in HttpClient 177 private HttpClient(URL url) in HttpClient() argument 179 this(url, (String)null, -1, false); in HttpClient() 182 protected HttpClient(URL url, in HttpClient() argument 184 this(url, null, -1, proxyDisabled); in HttpClient() 195 public HttpClient(URL url, String proxyHost, int proxyPort) in HttpClient() argument 197 this(url, proxyHost, proxyPort, false); in HttpClient() 200 protected HttpClient(URL url, Proxy p, int to) throws IOException { in HttpClient() argument 202 this.host = url.getHost(); in HttpClient() 203 this.url = url; in HttpClient() [all …]
|
/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 | 60 static JarFile getJarFile(URL url) throws IOException { in getJarFile() argument 61 return getJarFile(url, null); in getJarFile() 64 … static JarFile getJarFile(URL url, URLJarFileCloseController closeController) throws IOException { in getJarFile() argument 65 if (isFileURL(url)) in getJarFile() 66 return new URLJarFile(url, closeController); in getJarFile() 68 return retrieve(url, closeController); in getJarFile() 72 private URLJarFile(URL url, URLJarFileCloseController closeController) throws IOException { in URLJarFile() argument 73 super(ParseUtil.decode(url.getFile())); in URLJarFile() 77 private static boolean isFileURL(URL url) { in isFileURL() argument 78 if (url.getProtocol().equalsIgnoreCase("file")) { in isFileURL() [all …]
|
D | Handler.java | 126 protected void parseURL(URL url, String spec, in parseURL() argument 136 file = url.getFile(); in parseURL() 152 file = parseContextSpec(url, spec); in parseURL() 162 setURL(url, "jar", "", -1, file, ref); in parseURL() 166 URL url = null; in parseAbsoluteSpec() local 175 url = new URL(innerSpec); in parseAbsoluteSpec() 183 private String parseContextSpec(URL url, String spec) { in parseContextSpec() argument 184 String ctxFile = url.getFile(); in parseContextSpec() 191 url + in parseContextSpec() 202 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 | 31 public abstract ClassLoader getClassLoader(URL url, ClassLoader parent); in getClassLoader() argument 33 public static ClassLoader getInstance(URL url, ClassLoader parent) { in getInstance() argument 45 return factory.getClassLoader(url, parent); in getInstance() 68 public ClassLoader getClassLoader(URL url, ClassLoader parent) { in getClassLoader() argument 69 return new DexClassLoader(url.getPath(), tmp.getAbsolutePath(), in getClassLoader() 80 public ClassLoader getClassLoader(URL url, ClassLoader parent) { in getClassLoader() argument 81 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/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/ojluni/src/main/java/java/net/ |
D | URLClassLoader.java | 227 URL url = getResource(name); in getResourceAsStream() local 229 if (url == null) { in getResourceAsStream() 232 URLConnection urlc = url.openConnection(); in getResourceAsStream() 326 protected void addURL(URL url) { in addURL() argument 327 ucp.addURL(url); in addURL() 381 Manifest man, URL url) { 387 if (!pkg.isSealed(url)) { 412 URL url = res.getCodeSourceURL(); 417 if (getAndVerifyPackage(pkgname, man, url) == null) { 420 definePackage(pkgname, man, url); [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
D | HttpsURLConnectionTest.java | 58 URL url = new URL("https://localhost:55555"); in test_getCipherSuite() local 59 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); in test_getCipherSuite() 74 URL url = new URL("https://localhost:55555"); in test_getLocalCertificates() local 75 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); in test_getLocalCertificates() 116 URL url = new URL("https://localhost:55555"); in test_getLocalPrincipal() local 117 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); in test_getLocalPrincipal() 134 URL url = new URL("https://localhost:55555"); in test_getPeerPrincipal() local 135 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); in test_getPeerPrincipal() 157 URL url = new URL("https://localhost:55555"); in test_getServerCertificates() local 158 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); in test_getServerCertificates() [all …]
|
/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/luni/src/test/java/libcore/net/ |
D | NetworkSecurityPolicyTest.java | 98 URL url = new URL("http://localhost:" + server.getPort() + "/test.txt"); in testCleartextTrafficPolicyWithHttpURLConnection() local 100 url.openConnection().getContent(); in testCleartextTrafficPolicyWithHttpURLConnection() 111 URL url = new URL("http://localhost:" + server.getPort() + "/test.txt"); in testCleartextTrafficPolicyWithHttpURLConnection() local 113 url.openConnection().getContent(); in testCleartextTrafficPolicyWithHttpURLConnection() 126 URL url = new URL("ftp://localhost:" + server.getPort() + "/test.txt"); in testCleartextTrafficPolicyWithFtpURLConnection() local 128 url.openConnection().getContent(); in testCleartextTrafficPolicyWithFtpURLConnection() 139 URL url = new URL("ftp://localhost:" + server.getPort() + "/test.txt"); in testCleartextTrafficPolicyWithFtpURLConnection() local 141 url.openConnection().getContent(); in testCleartextTrafficPolicyWithFtpURLConnection() 153 URL url = new URL("jar:http://localhost:" + server.getPort() + "/test.jar!/"); in testCleartextTrafficPolicyWithJarHttpURLConnection() local 155 ((JarURLConnection) url.openConnection()).getManifest(); in testCleartextTrafficPolicyWithJarHttpURLConnection() [all …]
|
/libcore/libart/src/main/java/java/lang/ |
D | VMClassLoader.java | 68 URL url = urlHandler.getEntryUrlOrNull(name); in getResource() local 69 if (url != null) { in getResource() 70 return url; in getResource() 82 URL url = urlHandler.getEntryUrlOrNull(name); in getResources() local 83 if (url != null) { in getResources() 84 list.add(url); in getResources()
|
/libcore/ojluni/src/main/java/java/sql/ |
D | DriverManager.java | 189 public static Connection getConnection(String url, in getConnection() argument 191 return (getConnection(url, info, VMStack.getCallingClassLoader())); in getConnection() 208 public static Connection getConnection(String url, in getConnection() argument 219 return (getConnection(url, info, VMStack.getCallingClassLoader())); in getConnection() 233 public static Connection getConnection(String url) in getConnection() argument 237 return (getConnection(url, info, VMStack.getCallingClassLoader())); in getConnection() 252 public static Driver getDriver(String url) in getDriver() argument 255 println("DriverManager.getDriver(\"" + url + "\")"); in getDriver() 266 if(aDriver.driver.acceptsURL(url)) { in getDriver() 539 String url, java.util.Properties info, ClassLoader callerCL) throws SQLException { in getConnection() argument [all …]
|
D | Driver.java | 81 Connection connect(String url, java.util.Properties info) in connect() argument 95 boolean acceptsURL(String url) throws SQLException; in acceptsURL() argument 117 DriverPropertyInfo[] getPropertyInfo(String url, java.util.Properties info) in getPropertyInfo() argument
|