code: public String asString()
      {
          TreeMap<Tag, Value> orderedAttributes = new TreeMap<Tag, Value>(attributes);
          StringBuilder result = new StringBuilder();
          for (Iterator<Map.Entry<Tag, Value>> entries = orderedAttributes.entrySet().iterator(); entries.hasNext(); )
          {
              Map.Entry<Tag, Value> mapEntry = entries.next();
              Tag tag = mapEntry.getKey();
              Value value = mapEntry.getValue();
              if (value.isPresenceType())
              {
                  result.append(tag.tag);
              }
              else
              {
                  result.append("(").append(tag.tag).append("=");
                  if (value.multiValued)
                  {
                      Object[] values = value.getValues();
                      for (int i = 0; i < values.length; ++i)
                      {
                          if (i > 0) result.append(",");
                          if (value.isOpaqueType())
                              result.append(bytesToOpaque((byte[])values[i]));
                          else
                              result.append(escapeValue(String.valueOf(values[i])));
                      }
                  }
                  else
                  {
                      if (value.isOpaqueType())
                          result.append(bytesToOpaque((byte[])value.getValue()));
                      else
                          result.append(escapeValue(String.valueOf(value.getValue())));
                  }
                  result.append(")");
              }
              if (entries.hasNext()) result.append(",");
          }
          return result.toString();
      }
docs: Returns a string representation of this <code>Attributes</code> object, that can be passed to
  {@link #from(String)} to be parsed.
  
  @return the escaped attribute list string