/libcore/luni/src/test/java/libcore/java/net/ |
H A D | URLTest.java | 31 URL url = new URL("http://username:password@host:8080/directory/file?query#ref"); 32 assertEquals("http", url.getProtocol()); 33 assertEquals("username:password@host:8080", url.getAuthority()); 34 assertEquals("username:password", url.getUserInfo()); 35 assertEquals("host", url.getHost()); 36 assertEquals(8080, url.getPort()); 37 assertEquals(80, url.getDefaultPort()); 38 assertEquals("/directory/file?query", url.getFile()); 39 assertEquals("/directory/file", url.getPath()); 40 assertEquals("query", url [all...] |
H A D | OldCookieHandlerTest.java | 48 URL url = new URL(link); 49 URLConnection conn = url.openConnection(); 51 url = new URL(link); 52 conn = url.openConnection();
|
H A D | OldURLStreamHandlerTest.java | 108 URL url = new URL("http://test.org"); 111 handler.parseURL(url, str, 0, str.length()); 134 URL url = new URL("http://test.org"); 137 handler.setURL(url, "http", "localhost", 80, "foo.c", "ref"); 144 URL url = new URL("http://test.org"); 147 handler.setURL(url, "http", "localhost", 80, "authority", 159 for(URL url : urls) { 160 assertEquals("Test case for " + url.toString(), 161 url.toString(), handler.toExternalForm(url)); 204 parseURL(URL url, String spec, int start, int limit) argument [all...] |
H A D | OldURLClassLoaderTest.java | 174 public void addURL(URL url) { argument 175 super.addURL(url); 180 URL url) 182 return super.definePackage(name, man, url); 258 String url; 261 url = "file:" + path; 263 url = path; 265 url = "jar:file:" + path + "!/"; 267 urlList.add(new URL(url)); 178 definePackage(String name, Manifest man, URL url) argument
|
H A D | OldJarURLConnectionTest.java | 132 URL url = new URL("jar:file:///bar.jar!/foo.jar!/Bugs/HelloWorld.class"); 133 assertEquals("foo.jar!/Bugs/HelloWorld.class",((JarURLConnection)url.openConnection()).getEntryName()); 160 URL url = createContent("lf.jar", "missing"); 162 JarURLConnection connection = (JarURLConnection) url.openConnection(); 229 URL url = new URL("jar:file:" + file.getPath() + "!/HasAttributes.txt"); 231 JarURLConnection connection = (JarURLConnection) url.openConnection(); 261 URL url = new URL("jar:file:///bar.jar!/foo.jar!/Bugs/HelloWorld.class"); 262 String jarFileUrl = ((JarURLConnection) url.openConnection()).getJarFileURL().toString(); 301 URL url = new URL("jar:file:" + jarFileName + "!/" + entry); 302 URLConnection conn = url [all...] |
/libcore/luni/src/test/java/libcore/java/net/customstreamhandler/http/ |
H A D | Handler.java | 30 @Override protected URLConnection openConnection(URL url) throws IOException { argument 31 return new HandlerURLConnection(url); 35 protected HandlerURLConnection(URL url) { argument 36 super(url);
|
/libcore/luni/src/main/java/java/sql/ |
H A D | Driver.java | 39 * @param url 48 public boolean acceptsURL(String url) throws SQLException; argument 54 * @param url 66 public Connection connect(String url, Properties info) throws SQLException; argument 90 * @param url 105 public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) argument
|
H A D | DriverManager.java | 135 * @param url 143 public static Connection getConnection(String url) throws SQLException { argument 144 return getConnection(url, new Properties()); 150 * @param url 165 public static Connection getConnection(String url, Properties info) throws SQLException { argument 169 if (url == null) { 170 throw new SQLException("The url cannot be null", sqlState); 179 Connection theConnection = theDriver.connect(url, info); 192 * @param url 204 public static Connection getConnection(String url, Strin argument 226 getDriver(String url) argument [all...] |
/libcore/luni/src/main/java/libcore/net/url/ |
H A D | FileHandler.java | 18 package libcore.net.url; 36 * @return A connection to the resource pointed by this url. 37 * @param url 42 public URLConnection openConnection(URL url) throws IOException { argument 43 return openConnection(url, null); 50 * @param url 54 * @return a connection to the resource pointed by this url. 59 * if the url argument is null. 64 public URLConnection openConnection(URL url, Proxy proxy) throws IOException { argument 65 if (url 97 parseURL(URL url, String spec, int start, int end) argument [all...] |
H A D | FtpHandler.java | 18 package libcore.net.url; 41 * @param url 45 * @return a connection to the resource pointed by this url. 55 protected URLConnection openConnection(URL url, Proxy proxy) throws IOException { argument 56 if (url == null || proxy == null) { 57 throw new IllegalArgumentException("url == null || proxy == null"); 59 return new FtpURLConnection(url, proxy);
|
H A D | JarHandler.java | 18 package libcore.net.url; 32 * this url. 47 * @param url 57 protected void parseURL(URL url, String spec, int start, int limit) { argument 58 String file = url.getFile(); 81 // check that the embedded url is valid 86 setURL(url, "jar", "", -1, null, null, file, null, null); 90 * Build and return the externalized string representation of url. 92 * @return String the externalized string representation of url 93 * @param url 97 toExternalForm(URL url) argument [all...] |
H A D | FtpURLConnection.java | 18 package libcore.net.url; 104 * @param url 106 protected FtpURLConnection(URL url) { argument 107 super(url); 108 hostName = url.getHost(); 109 String parse = url.getUserInfo(); 121 uri = url.toURI(); 130 * @param url 133 protected FtpURLConnection(URL url, Proxy proxy) { argument 134 this(url); [all...] |
/libcore/support/src/test/java/tests/support/ |
H A D | Support_ClassLoader.java | 31 public abstract ClassLoader getClassLoader(URL url, ClassLoader parent); argument 33 public static ClassLoader getInstance(URL url, ClassLoader parent) { argument 45 return factory.getClassLoader(url, parent); 68 public ClassLoader getClassLoader(URL url, ClassLoader parent) { argument 69 return new DexClassLoader(url.getPath(), tmp.getAbsolutePath(), 80 public ClassLoader getClassLoader(URL url, ClassLoader parent) { argument 81 return new URLClassLoader(new URL[] { url }, parent);
|
H A D | Support_GetLocal.java | 37 public static File getLocalFile(String url) throws IOException, argument 39 url = Support_Resources.RESOURCE_PACKAGE + url; 40 File temp = cache.get(url); 42 InputStream in = Support_GetLocal.class.getResourceAsStream(url); 53 cache.put(url, temp); 58 public static File getExternalLocalFile(String url) throws IOException, argument 60 File temp = cache.get(url); 62 InputStream in = new URL(url).openStream(); 73 cache.put(url, tem 78 getStream(String url) argument [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/internal/net/www/protocol/file/ |
H A D | FileURLConnectionTest.java | 29 import libcore.net.url.FileURLConnection; 44 final URL url = loader.getResource(resourceName); 45 assertNotNull("Cannot find test resource " + resourceName, url); 46 is = url.openStream(); 66 URL url = createTempFileWithContent(resourceName); 67 return new FileURLConnection(url).getContentType(); 83 URL url = createTempFileWithContent(RESOURCE_NAME); 84 assertNotNull(url); 85 URL anchorUrl = new URL(url, "#anchor"); 94 URL url [all...] |
/libcore/luni/src/main/java/java/net/ |
H A D | URLStreamHandler.java | 21 import libcore.net.url.UrlUtils; 74 * @param url 85 protected void parseURL(URL url, String spec, int start, int end) { argument 86 if (this != url.streamHandler) { 147 authority = url.getAuthority(); 148 userInfo = url.getUserInfo(); 149 host = url.getHost(); 153 port = url.getPort(); 154 path = url.getPath(); 155 query = url 261 toExternalForm(URL url) argument 265 toExternalForm(URL url, boolean escapeIllegalCharacters) argument 323 getHostAddress(URL url) argument 338 hashCode(URL url) argument [all...] |
H A D | URLClassLoader.java | 71 static IndexFile readIndexFile(JarFile jf, JarEntry indexEntry, URL url) { argument 76 String parentURLString = getParentURL(url).toExternalForm(); 123 private static URL getParentURL(URL url) throws IOException { argument 124 URL fileURL = ((JarURLConnection) url.openConnection()).getJarFileURL(); 146 URL url; field in class:URLClassLoader.URLHandler 149 public URLHandler(URL url) { argument 150 this.url = url; 151 this.codeSourceUrl = url; 162 URL resURL = targetURL(url, nam 245 URLJarHandler(URL url, URL jarURL, JarFile jf, String prefixName) argument 254 URLJarHandler(URL url, URL jarURL, JarFile jf, String prefixName, IndexFile index) argument 403 getSubHandler(URL url) argument 422 createURLSubJarHandler(URL url) argument 456 URLFileHandler(URL url) argument 564 addURL(URL url) argument 660 isDirectory(URL url) argument 763 createSearchURL(URL url) argument 846 createURLHandler(URL url) argument 850 createURLFileHandler(URL url) argument 854 createURLJarHandler(URL url) argument 911 definePackage(String packageName, Manifest manifest, URL url) argument [all...] |
H A D | JarURLConnection.java | 33 * as follows: <i>jar:{archive-url}!/{entry}</i> where "!/" is called a 62 * @param url 67 protected JarURLConnection(URL url) throws MalformedURLException { argument 68 super(url); 69 file = decode(url.getFile()); 81 if (url.getRef() != null) { 82 entryName += "#" + url.getRef();
|
H A D | HttpURLConnection.java | 56 * URL url = new URL("http://www.android.com/"); 57 * HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); 101 * HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); 155 * HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); 158 * if (!url.getHost().equals(urlConnection.getURL().getHost())) { 522 * resource specified by the {@code url}. 524 * @param url 529 protected HttpURLConnection(URL url) { argument 530 super(url); 580 int port = url [all...] |
H A D | URLConnection.java | 36 * URL url = new URL("ftp://mirror.csclub.uwaterloo.ca/index.html"); 37 * URLConnection urlConnection = url.openConnection(); 84 protected URL url; field in class:URLConnection 152 * @param url 156 protected URLConnection(URL url) { argument 157 this.url = url; 194 if ((contentType = guessContentTypeFromName(url.getFile())) == null) { 228 if ((contentType = guessContentTypeFromName(url.getFile())) == null) { 656 return url; 679 guessContentTypeFromName(String url) argument [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
H A D | HttpsURLConnectionTest.java | 58 URL url = new URL("https://localhost:55555"); 59 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); 74 URL url = new URL("https://localhost:55555"); 75 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); 126 URL url = new URL("https://localhost:55555"); 127 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); 144 URL url = new URL("https://localhost:55555"); 145 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); 167 URL url = new URL("https://localhost:55555"); 168 HttpsURLConnection connection = (HttpsURLConnection) url 266 MyHttpsURLConnection(URL url) argument 270 MyHttpsURLConnection(URL url, String type) argument [all...] |
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/net/ |
H A D | ContentHandlerFactoryTest.java | 36 URL url = new URL("http://" + 41 URLConnection con = url.openConnection(); 76 URL url; 78 url = new URL("http://" + 80 assertNotNull(ch.getContent(url.openConnection()));
|
/libcore/luni/src/test/java/libcore/xml/ |
H A D | JaxenXPathTestSuite.java | 73 * <document url="..."> 78 * <document url="..."> 90 String url = document.getAttribute("url"); 91 InputSource inputSource = new InputSource("file:" + jaxenHome + "/" + url); 93 contextToTestSuite(result, url, inputSource, context); 103 private static void contextToTestSuite(TestSuite suite, String url, argument 120 Context context = new Context(inputSource, url, select); 219 private final String url; field in class:JaxenXPathTestSuite.Context 222 Context(InputSource inputSource, String url, Strin argument [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/ |
H A D | JarURLConnectionTest.java | 78 URL url = copyAndOpenResourceStream("lf.jar", "foo.jar!/Bugs/HelloWorld.class"); 79 assertEquals("foo.jar!/Bugs/HelloWorld.class", ((JarURLConnection) url.openConnection()).getEntryName()); 99 URL url = copyAndOpenResourceStream("lf.jar", "missing"); 102 connection = (JarURLConnection) url.openConnection(); 161 URL url = new URL("jar:file:" + file.getPath() + "!/HasAttributes.txt"); 163 JarURLConnection connection = (JarURLConnection) url.openConnection(); 190 URL url = new URL("jar:file:///bar.jar!/foo.jar!/Bugs/HelloWorld.class"); 191 assertEquals("file:///bar.jar", ((JarURLConnection) url.openConnection()).getJarFileURL().toString()); 219 URL url = new URL("jar:file:" + file.getAbsolutePath() + "!/entry.txt"); 220 URLConnection conn = url [all...] |
/libcore/benchmarks/src/benchmarks/regression/ |
H A D | SSLSocketBenchmark.java | 48 URL url = new URL(uri); 50 this.host = InetAddress.getByName(url.getHost()); 52 int p = url.getPort();
|