Searched refs:url (Results 1 - 25 of 68) sorted by relevance

123

/libcore/luni/src/test/java/libcore/java/net/
H A DURLTest.java29 URL url = new URL("http://username:password@host:8080/directory/file?query#ref");
30 assertEquals("http", url.getProtocol());
31 assertEquals("username:password@host:8080", url.getAuthority());
32 assertEquals("username:password", url.getUserInfo());
33 assertEquals("host", url.getHost());
34 assertEquals(8080, url.getPort());
35 assertEquals(80, url.getDefaultPort());
36 assertEquals("/directory/file?query", url.getFile());
37 assertEquals("/directory/file", url.getPath());
38 assertEquals("query", url
[all...]
H A DOldCookieHandlerTest.java48 URL url = new URL(link);
49 URLConnection conn = url.openConnection();
51 url = new URL(link);
52 conn = url.openConnection();
H A DOldURLStreamHandlerTest.java108 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...]
/libcore/luni/src/test/java/libcore/java/net/customstreamhandler/http/
H A DHandler.java30 @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 DDriver.java43 * @param url
52 public boolean acceptsURL(String url) throws SQLException; argument
58 * @param url
70 public Connection connect(String url, Properties info) throws SQLException; argument
94 * @param url
109 public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) argument
H A DDriverManager.java131 * @param url
139 public static Connection getConnection(String url) throws SQLException { argument
140 return getConnection(url, new Properties());
146 * @param url
161 public static Connection getConnection(String url, Properties info) throws SQLException { argument
165 if (url == null) {
166 throw new SQLException("The url cannot be null", sqlState);
175 Connection theConnection = theDriver.connect(url, info);
188 * @param url
200 public static Connection getConnection(String url, Strin argument
222 getDriver(String url) argument
[all...]
/libcore/luni/src/main/java/libcore/net/http/
H A DHttpsHandler.java28 @Override protected URLConnection openConnection(URL url) throws IOException { argument
29 return new HttpsURLConnectionImpl(url, getDefaultPort());
32 @Override protected URLConnection openConnection(URL url, Proxy proxy) throws IOException { argument
33 if (url == null || proxy == null) {
34 throw new IllegalArgumentException("url == null || proxy == null");
36 return new HttpsURLConnectionImpl(url, getDefaultPort(), proxy);
H A DHttpHandler.java32 @Override protected URLConnection openConnection(URL url, Proxy proxy) throws IOException { argument
33 if (url == null || proxy == null) {
34 throw new IllegalArgumentException("url == null || proxy == null");
36 return new HttpURLConnectionImpl(url, getDefaultPort(), proxy);
H A DHttpURLConnectionImpl.java68 protected HttpURLConnectionImpl(URL url, int port) { argument
69 super(url);
73 protected HttpURLConnectionImpl(URL url, int port, Proxy proxy) { argument
74 this(url, port);
186 throw new FileNotFoundException(url.toString());
383 URL previousUrl = url;
384 url = new URL(previousUrl, location);
385 if (!previousUrl.getProtocol().equals(url.getProtocol())) {
388 if (previousUrl.getHost().equals(url.getHost())
389 && previousUrl.getEffectivePort() == url
[all...]
/libcore/luni/src/main/java/libcore/net/url/
H A DFileHandler.java18 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 DFtpHandler.java18 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 DJarHandler.java18 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 DFtpURLConnection.java18 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...]
H A DFileURLConnection.java18 package libcore.net.url;
55 * @param url The URL this connection is connected to
57 public FileURLConnection(URL url) { argument
58 super(url);
59 filename = url.getFile();
126 String result = guessContentTypeFromName(url.getFile());
/libcore/support/src/test/java/tests/support/
H A DSupport_ClassLoader.java31 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 DSupport_GetLocal.java37 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/luni/src/main/java/java/net/
H A DURLStreamHandler.java21 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) {
145 authority = url.getAuthority();
146 userInfo = url.getUserInfo();
147 host = url.getHost();
151 port = url.getPort();
152 path = url.getPath();
153 query = url
259 toExternalForm(URL url) argument
263 toExternalForm(URL url, boolean escapeIllegalCharacters) argument
321 getHostAddress(URL url) argument
336 hashCode(URL url) argument
[all...]
H A DJarURLConnection.java31 * as follows: <i>jar:{archive-url}!/{entry}</i> where "!/" is called a
60 * @param url
65 protected JarURLConnection(URL url) throws MalformedURLException { argument
66 super(url);
67 file = url.getFile();
72 fileURL = new URL(url.getFile().substring(0,sepIdx));
78 if (url.getRef() != null) {
79 entryName += "#" + url.getRef();
H A DURLClassLoader.java71 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 DHttpURLConnection.java57 * URL url = new URL("http://www.android.com/");
58 * HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
102 * HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
156 * HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
159 * if (!url.getHost().equals(urlConnection.getURL().getHost())) {
514 * resource specified by the {@code url}.
516 * @param url
521 protected HttpURLConnection(URL url) { argument
522 super(url);
572 int port = url
[all...]
/libcore/luni/src/test/java/tests/api/javax/net/ssl/
H A DHttpsURLConnectionTest.java58 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 DContentHandlerFactoryTest.java38 URL url = new URL("http://" +
43 URLConnection con = url.openConnection();
78 URL url;
80 url = new URL("http://" +
82 assertNotNull(ch.getContent(url.openConnection()));
/libcore/luni/src/test/java/libcore/xml/
H A DJaxenXPathTestSuite.java73 * <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/luni/src/test/java/libcore/net/http/
H A DHttpResponseCacheTest.java142 URL url = server.getUrl("/");
143 HttpURLConnection conn = (HttpURLConnection) url.openConnection();
172 URL url = server.getUrl("/");
173 HttpURLConnection conn = (HttpURLConnection) url.openConnection();
179 CacheResponse cached = cache.get(url.toURI(), "GET",
238 URL url = server.getUrl("/");
239 URLConnection connection = url.openConnection();
444 URL url = server.getUrl("/");
445 URLConnection urlConnection = url.openConnection();
542 URL url
1606 assertCookies(URL url, String... expectedCookies) argument
[all...]
/libcore/luni/src/main/java/javax/net/ssl/
H A DHttpsURLConnection.java53 * URL url = new URL("https://www.example.com/");
54 * HttpsURLConnection urlConnection = (HttpsURLConnection) url.openConnection();
86 * URL url = new URL("https://www.example.com/");
87 * HttpsURLConnection urlConnection = (HttpsURLConnection) url.openConnection();
172 * @param url
175 protected HttpsURLConnection(URL url) { argument
176 super(url);

Completed in 4298 milliseconds

123