while (numTries > 0 || madeInputStream) {
while (numTries > 0 && !madeInputStream) {
  public String getResponse(URLConnection connection) throws IOException {    StringBuffer sb = new StringBuffer ();	int numTries = 3;	boolean madeInputStream = false;    InputStream is = null;		while (numTries > 0 || madeInputStream) {	  try {		is = connection.getInputStream();		madeInputStream = true;	  } catch (IOException ioe) {		System.out.println (getName () + ".getResponse - IO Exception on reading from URL, trying again.");		numTries--;		try { Thread.sleep (500l); } catch (Exception e) {}	  }	}	if (!madeInputStream)		System.out.println (getName () + ".getResponse - ERROR : could not read from URL " + connection);    byte b[] = new byte[1024];    int len;    while ((len = is.read(b)) > -1)      sb.append (new String(b, 0, len));    return sb.toString ();  }