FileDocCategorySizeDatePackage
TimeURLConnection.javaAPI DocExample1140Sat Sep 09 21:21:24 BST 2000com.macfaq.net.www.protocol.time

TimeURLConnection

public class TimeURLConnection extends URLConnection

Fields Summary
private Socket
connection
public static final int
DEFAULT_PORT
Constructors Summary
public TimeURLConnection(URL u)


      
    super(u);
    this.setDoInput(true);
  
Methods Summary
public synchronized voidconnect()

  
    if (!connected) {
      int port = url.getPort();
      if ( port < 0) {
        port = DEFAULT_PORT;
      }
      this.connection = new Socket(url.getHost(), port);
      this.connected = true;
    } 
  
  
public java.lang.ObjectgetContent()

    
    ContentHandler ch = new x_time();
    return ch.getContent(this);
    
  
public java.lang.ObjectgetContent(java.lang.Class[] classes)

    
    ContentHandler ch = new x_time();
    return ch.getContent(this, classes);
    
  
public java.lang.StringgetContentType()

    return "application/x-time";
  
public java.io.InputStreamgetInputStream()

    if (!connected) this.connect();
	  return this.connection.getInputStream();