code: private void printAvpsAux(AvpSet avpSet, int level) throws AvpDataException {
      String prefix = "                      ".substring(0, level * 2);
  
      for (Avp avp : avpSet) {
        AvpRepresentation avpRep = AvpDictionary.INSTANCE.getAvp(avp.getCode(), avp.getVendorId());
  
        if (avpRep != null && avpRep.getType().equals("Grouped")) {
          log.info(prefix + "<avp name=\"" + avpRep.getName() + "\" code=\"" + avp.getCode() + "\" vendor=\"" + avp.getVendorId() + "\">");
          printAvpsAux(avp.getGrouped(), level + 1);
          log.info(prefix + "</avp>");
        } else if (avpRep != null) {
          String value = "";
  
          if (avpRep.getType().equals("Integer32"))
            value = String.valueOf(avp.getInteger32());
          else if (avpRep.getType().equals("Integer64") || avpRep.getType().equals("Unsigned64"))
            value = String.valueOf(avp.getInteger64());
          else if (avpRep.getType().equals("Unsigned32"))
            value = String.valueOf(avp.getUnsigned32());
          else if (avpRep.getType().equals("Float32"))
            value = String.valueOf(avp.getFloat32());
          else
            //value = avp.getOctetString();
            value = new String(avp.getOctetString(), StandardCharsets.UTF_8);
  
          log.info(prefix + "<avp name=\"" + avpRep.getName() + "\" code=\"" + avp.getCode() + "\" vendor=\"" + avp.getVendorId()
              + "\" value=\"" + value + "\" />");
        }
      }
    }
docs: Prints the AVPs present in an AvpSet with a specified 'tab' level
  
  @param avpSet
  the AvpSet containing the AVPs to be printed
  @param level
  an int representing the number of 'tabs' to make a pretty
  print
  @throws AvpDataException