home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &n…he Search for Life DVD 2 / DVD-ROM.iso / install / jre1_3 / lib / rt.jar / sun / net / www / protocol / gopher / Handler.class (.txt) < prev   
Encoding:
Java Class File  |  1979-12-31  |  729 b   |  25 lines

  1. package sun.net.www.protocol.gopher;
  2.  
  3. import java.io.IOException;
  4. import java.net.URL;
  5. import java.net.URLConnection;
  6. import java.net.URLStreamHandler;
  7. import sun.net.www.protocol.http.HttpURLConnection;
  8.  
  9. public class Handler extends URLStreamHandler {
  10.    protected int getDefaultPort() {
  11.       return 70;
  12.    }
  13.  
  14.    public URLConnection openConnection(URL var1) throws IOException {
  15.       if (GopherClient.getUseGopherProxy()) {
  16.          String var2 = GopherClient.getGopherProxyHost();
  17.          if (var2 != null) {
  18.             return new HttpURLConnection(var1, var2, GopherClient.getGopherProxyPort());
  19.          }
  20.       }
  21.  
  22.       return new GopherURLConnection(var1);
  23.    }
  24. }
  25.