FileDocCategorySizeDatePackage
TimeURLConnection.javaAPI DocExample1090Sun Dec 12 10:55:52 GMT 2004com.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);
  
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();