StringBuffer buf = new StringBuffer();
StringBuilder buf = new StringBuilder();
  Properties parseAuthParams(String text)  {    int len = text.length();    String key = null;    StringBuffer buf = new StringBuffer();    Properties ret = new Properties();    boolean inQuote = false;    for (int i = 0; i < len; i++)      {        char c = text.charAt(i);        if (c == '"')          {            inQuote = !inQuote;          }        else if (c == '=' && key == null)          {            key = buf.toString().trim();            buf.setLength(0);          }        else if (c == ' ' && !inQuote)          {            String value = unquote(buf.toString().trim());            ret.put(key, value);            key = null;            buf.setLength(0);          }        else if (c != ',' || (i <(len - 1) && text.charAt(i + 1) != ' '))          {               buf.append(c);          }      }    if (key != null)      {        String value = unquote(buf.toString().trim());        ret.put(key, value);      }    return ret;  }