if (!i.hasNext()) { return null; }
  public String getHeaderFieldKey(int index)  {    if (!connected)      {        try          {            connect();          }        catch (IOException e)          {            return null;          }      }    if (index == 0)      {        return null;      }    Iterator i = response.getHeaders().entrySet().iterator();    Map.Entry entry;    int count = 1;    do      {        entry = (Map.Entry) i.next();        count++;      }    while (count <= index);    return (String) entry.getKey();  }