static AttributeName nameByBuffer(@NoLength char[] buf,int offset,int length,boolean checkNcName){
  int hash=AttributeName.bufToHash(buf,length);
  int index=Arrays.binarySearch(AttributeName.ATTRIBUTE_HASHES,hash);
  if (index < 0) {
    return AttributeName.createAttributeName(Portability.newLocalNameFromBuffer(buf,offset,length),checkNcName);
  }
 else {
    AttributeName rv=AttributeName.ATTRIBUTE_NAMES[index];
    @Local String name=rv.getLocal(AttributeName.HTML);
    if (!Portability.localEqualsBuffer(name,buf,offset,length)) {
      return AttributeName.createAttributeName(Portability.newLocalNameFromBuffer(buf,offset,length),checkNcName);
    }
    return rv;
  }
}

static AttributeName nameByBuffer ( @ NoLength char [ ] buf , int offset , int length , boolean checkNcName ) { int hash = AttributeName . bufToHash ( buf , length ) ; int index = Arrays . binarySearch ( AttributeName . ATTRIBUTE_HASHES , hash ) ; if ( index < 0 ) { return AttributeName . createAttributeName ( Portability . newLocalNameFromBuffer ( buf , offset , length ) , checkNcName ) ; } else { AttributeName rv = AttributeName . ATTRIBUTE_NAMES [ index ] ; @ Local String name = rv . getLocal ( AttributeName . HTML ) ; if ( ! Portability . localEqualsBuffer ( name , buf , offset , length ) ) { return AttributeName . createAttributeName ( Portability . newLocalNameFromBuffer ( buf , offset , length ) , checkNcName ) ; } return rv ; } }
returns an attribute name by buffer . < p > c + + ownership : the return value is either released by the caller if the attribute is a duplicate or the ownership is transferred to htmlattributes and released upon clearing or destroying that object .
