FileDocCategorySizeDatePackage
ChargenURLConnection.javaAPI DocExample856Sun Dec 12 10:55:34 GMT 2004com.macfaq.net.www.protocol.chargen

ChargenURLConnection

public class ChargenURLConnection extends URLConnection

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


     
    super(u);
  
Methods Summary
public synchronized voidconnect()

  
    if (!connected) {
      int port = url.getPort();
      if ( port < 1 || port > 65535) {
        port = DEFAULT_PORT;
      }
      this.connection = new Socket(url.getHost(), port);
      this.connected = true;
    } 
  
public java.lang.StringgetContentType()

    return "text/plain";
  
public synchronized java.io.InputStreamgetInputStream()

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