Last change
on this file since 627 was 627, checked in by framm, 16 years ago |
|
-
Property svn:eol-style
set to
native
|
File size:
1.0 KB
|
Line | |
---|
1 | /* Dummy handler just to load the override URLConnection class */
|
---|
2 | package org.openstreetmap.josm.io;
|
---|
3 |
|
---|
4 | import java.io.IOException;
|
---|
5 | import java.net.URL;
|
---|
6 | import java.net.Proxy;
|
---|
7 |
|
---|
8 | // This is also a java.net.URLStreamHandler
|
---|
9 | // Basically a copy of sun.net.www.protocol.http.Handler
|
---|
10 | public class MyHttpHandler extends sun.net.www.protocol.http.Handler {
|
---|
11 | protected String proxy;
|
---|
12 | protected int proxyPort;
|
---|
13 |
|
---|
14 | public MyHttpHandler() {
|
---|
15 | super();
|
---|
16 | proxy = null;
|
---|
17 | proxyPort = -1;
|
---|
18 | }
|
---|
19 |
|
---|
20 | protected java.net.URLConnection openConnection(URL u)
|
---|
21 | throws IOException {
|
---|
22 | return openConnection(u, (Proxy) null);
|
---|
23 | }
|
---|
24 | public MyHttpHandler(String proxy, int port) {
|
---|
25 | proxy = proxy;
|
---|
26 | proxyPort = port;
|
---|
27 | }
|
---|
28 |
|
---|
29 | protected java.net.URLConnection openConnection(URL u, Proxy p)
|
---|
30 | throws IOException {
|
---|
31 | return new MyHttpURLConnection(u, p, this);
|
---|
32 | }
|
---|
33 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.