public static Map attrSetToMap(AttrSet attrSet,boolean fetchByteValues){
  Map attributesMap=new AMHashMap(fetchByteValues);
  if (attrSet == null) {
    return attributesMap;
  }
  int attrSetSize=attrSet.size();
  if (!fetchByteValues) {
    for (int i=0; i < attrSetSize; i++) {
      Attr attr=attrSet.elementAt(i);
      String values[]=attr.getStringValues();
      attributesMap.put(attr.getName(),stringArrayToSet(values));
    }
  }
 else {
    for (int i=0; i < attrSetSize; i++) {
      Attr attr=attrSet.elementAt(i);
      attributesMap.put(attr.getName(),attr.getByteValues());
    }
  }
  return attributesMap;
}

public static Map attrSetToMap ( AttrSet attrSet , boolean fetchByteValues ) { Map attributesMap = new AMHashMap ( fetchByteValues ) ; if ( attrSet == null ) { return attributesMap ; } int attrSetSize = attrSet . size ( ) ; if ( ! fetchByteValues ) { for ( int i = 0 ; i < attrSetSize ; i ++ ) { Attr attr = attrSet . elementAt ( i ) ; String values [ ] = attr . getStringValues ( ) ; attributesMap . put ( attr . getName ( ) , stringArrayToSet ( values ) ) ; } } else { for ( int i = 0 ; i < attrSetSize ; i ++ ) { Attr attr = attrSet . elementAt ( i ) ; attributesMap . put ( attr . getName ( ) , attr . getByteValues ( ) ) ; } } return attributesMap ; }
method to convert a attrset object to map .
