home *** CD-ROM | disk | FTP | other *** search
- package sun.net.www.protocol.gopher;
-
- import java.io.IOException;
- import java.net.URL;
- import java.net.URLConnection;
- import java.net.URLStreamHandler;
- import sun.net.www.protocol.http.HttpURLConnection;
-
- public class Handler extends URLStreamHandler {
- protected int getDefaultPort() {
- return 70;
- }
-
- public URLConnection openConnection(URL var1) throws IOException {
- if (GopherClient.getUseGopherProxy()) {
- String var2 = GopherClient.getGopherProxyHost();
- if (var2 != null) {
- return new HttpURLConnection(var1, var2, GopherClient.getGopherProxyPort());
- }
- }
-
- return new GopherURLConnection(var1);
- }
- }
-