System.err.println("Thread " + this.getName() + ": Cannot found " + key
System.err.println("Thread " + this.getName() + ": Cannot find " + key
  private int extractIntFromHTML(String key)  {    if (lastHTMLReply == null)    {      if (debugLevel > 0)        System.err.println("Thread " + this.getName()            + ": There is no previous HTML reply");      return -1;    }    // Look for the key    int keyIndex = lastHTMLReply.indexOf(key);    if (keyIndex == -1)    {      // Dirty hack here, ugly but convenient      if ((key.compareTo("userId=") == 0) && (lastUserId >= 0))        return lastUserId;      if (debugLevel > 0)        System.err.println("Thread " + this.getName() + ": Cannot found " + key            + " in last HTML reply<br>");      if (debugLevel > 1)        System.err.println("Thread " + this.getName()            + ": Last HTML reply is: " + lastHTMLReply + "<br>");      return -1;    }    int lastIndex = isMin(Integer.MAX_VALUE, lastHTMLReply.indexOf('\"',        keyIndex + key.length()));    lastIndex = isMin(lastIndex, lastHTMLReply.indexOf('?', keyIndex        + key.length()));    lastIndex = isMin(lastIndex, lastHTMLReply.indexOf('&', keyIndex        + key.length()));    lastIndex = isMin(lastIndex, lastHTMLReply.indexOf('>', keyIndex        + key.length()));    Integer foo = new Integer(lastHTMLReply.substring(keyIndex + key.length(),        lastIndex));    // Dirty hack again here, ugly but convenient    if (key.compareTo("userId=") == 0)      lastUserId = foo.intValue();    return foo.intValue();  }