if (destination != null) if (destination == dest) return; else throw new IOException("pipe already connected");
if (ever_connected) throw new IOException("Already connected");
  public void connect (PipedInputStream dest) throws IOException  {    if (closed)      throw new IOException("pipe closed");    if (destination != null)      if (destination == dest)	return;      else        throw new IOException("pipe already connected");    destination = dest;    try    {      dest.connect(this);    }    catch (IOException ex)    {      destination = null;      throw ex;    }  }