FileDocCategorySizeDatePackage
URLTimeClient.javaAPI DocExample643Sat Sep 09 21:21:30 BST 2000None

URLTimeClient

public class URLTimeClient extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

  
    System.setProperty("java.protocol.handler.pkgs", 
     "com.macfaq.net.www.protocol");
  
    try {
      // You can replace this with your own time server
      // use tock.usno.navy.mil????
      URL u = new URL("time://vision.poly.edu/");
      Class[] types = {String.class, Date.class, 
       Calendar.class, Long.class};
      Object o = u.getContent(types);
      System.out.println(o);
    }
    catch (IOException e) {
     // Let's see what went wrong
     e.printStackTrace(); 
    }