code: public final void addAttribute(
          String uri,
          String local,
          String qname,
          String type,
          String val)
      {
          int index = super.getLength();
          super.addAttribute(uri, local, qname, type, val);
          // (index + 1) is now the number of attributes
          // so either compare (index+1) to MAX, or compare index to (MAX-1)
  
          if (index < MAXMinus1)
          {
              return;
          }
          else if (index == MAXMinus1)
          {
              switchOverToHash(MAX);
          }
          else
          {
              /* add the key with the format of "prefix:localName" */
              /* we have just added the attibute, its index is the old length */
              Integer i = new Integer(index);
              m_indexFromQName.put(qname, i);
              
              /* now add with key of the format "{uri}localName" */
              m_buff.setLength(0);
              m_buff.append('{').append(uri).append('}').append(local);
              String key = m_buff.toString();
              m_indexFromQName.put(key, i);
          }
          return;
      }
docs: This method adds the attribute, but also records its qName/index pair in
  the hashtable for fast lookup by getIndex(qName).
  @param uri the URI of the attribute
  @param local the local name of the attribute
  @param qname the qualified name of the attribute
  @param type the type of the attribute
  @param val the value of the attribute
  
  @see org.xml.sax.helpers.AttributesImpl#addAttribute(String, String, String, String, String)
  @see #getIndex(String)