code: public void addAttribute (String uri, String localName, String qName,
                    String type, String value)
      {
      super.addAttribute (uri, localName, qName, type, value);
  
      int length = getLength ();
  
      if (length > specified.length) {
          boolean[] newFlags = new boolean [length];
          System.arraycopy (declared, 0, newFlags, 0, declared.length);
          declared = newFlags;
  
          newFlags = new boolean [length];
          System.arraycopy (specified, 0, newFlags, 0, specified.length);
          specified = newFlags;
      }
  
      specified [length - 1] = true;
      declared [length - 1] = !"CDATA".equals (type);
      }
docs: Add an attribute to the end of the list, setting its
  "specified" flag to true.  To set that flag's value
  to false, use {@link #setSpecified}.
  
  <p>Unless the attribute <em>type</em> is CDATA, this attribute
  is marked as being declared in the DTD.  To set that flag's value
  to true for CDATA attributes, use {@link #setDeclared}.
  
  @param uri The Namespace URI, or the empty string if
  none is available or Namespace processing is not
  being performed.
  @param localName The local name, or the empty string if
  Namespace processing is not being performed.
  @param qName The qualified (prefixed) name, or the empty string
  if qualified names are not available.
  @param type The attribute type as a string.
  @param value The attribute value.
  
  @see AttributesImpl#addAttribute