FileDocCategorySizeDatePackage
DateAtHost.javaAPI DocExample692Mon May 01 14:41:46 BST 2000None

DateAtHost

public class DateAtHost extends Date

Fields Summary
static int
timePort
static final long
offset
Constructors Summary
public DateAtHost(String host)


           
        this( host, timePort );
    
public DateAtHost(String host, int port)

        Socket server = new Socket( host, port );
        DataInputStream din =
          new DataInputStream( server.getInputStream(  ) );
        int time = din.readInt(  );
        server.close(  );

        setTime( (((1L << 32) + time) - offset) * 1000 );
    
Methods Summary