home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 1999 March / maximum-cd-1999-03.iso / Feature / Lotus / ORGANIZE / COMPNENT / LTOUIN21.ZIP / sun / activator / protocol / ProxyInfo.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-02-13  |  993 b   |  41 lines

  1. package sun.activator.protocol;
  2.  
  3. public class ProxyInfo {
  4.    String proxy;
  5.    int port = -1;
  6.  
  7.    public ProxyInfo(String var1) {
  8.       if (var1 != null) {
  9.          int var2 = var1.lastIndexOf(58);
  10.          if (var2 >= 0) {
  11.             this.proxy = var1.substring(0, var2);
  12.  
  13.             try {
  14.                this.port = Integer.parseInt(var1.substring(var2 + 1));
  15.                return;
  16.             } catch (Exception var3) {
  17.                return;
  18.             }
  19.          }
  20.  
  21.          if (!var1.equals("")) {
  22.             this.proxy = var1;
  23.          }
  24.       }
  25.  
  26.    }
  27.  
  28.    public ProxyInfo(String var1, int var2) {
  29.       this.proxy = var1;
  30.       this.port = var2;
  31.    }
  32.  
  33.    public String getProxy() {
  34.       return this.proxy;
  35.    }
  36.  
  37.    public int getPort() {
  38.       return this.port;
  39.    }
  40. }
  41.