FileDocCategorySizeDatePackage
ProtocolTesterApplet.javaAPI DocExample1022Sat Sep 09 19:54:34 BST 2000None

ProtocolTesterApplet

public class ProtocolTesterApplet extends Applet

Fields Summary
TextArea
results
Constructors Summary
Methods Summary
public voidinit()

  

     
    this.setLayout(new BorderLayout());    
    this.add("Center", results);
  
public voidstart()

  
    String host = "www.peacefire.org";
    String file = "/bypass/SurfWatch/";
    
    String[] schemes = {"http",   "https",   "ftp",  "mailto", 
                        "telnet", "file",    "ldap", "gopher",
                        "jdbc",   "rmi",     "jndi", "jar",
                        "doc",    "netdoc",  "nfs",  "verbatim",
                        "finger", "daytime", "systemresource"};
                          
    for (int i = 0; i < schemes.length; i++) {
      try {
        URL u = new URL(schemes[i], host, file);
        results.append(schemes[i] + " is supported\r\n");
      }
      catch (MalformedURLException e) {
        results.append(schemes[i] + " is not supported\r\n");      
      }
    }