outputStream = new BufferedOutputStream (socket.getOutputStream()); bufferedOutputStream = new ByteArrayOutputStream (256);
  public void connect() throws IOException  {    // Call is ignored if already connected.    if (connected)      return;    // Get address and port number.    int port;    if (proxyInUse)      {	port = proxyPort;	socket = new Socket(proxyHost, port);      }    else      {	if ((port = url.getPort()) == -1)	  port = 80;	// Open socket and output stream.	socket = new Socket(url.getHost(), port);      }    inputStream =      new DataInputStream(new BufferedInputStream(socket.getInputStream()));    sendRequest();    receiveReply();    connected = true;  }