code: public synchronized void addDiscoverInfoTo(DiscoverInfo response) {
          // First add the identities of the connection
          response.addIdentities(getIdentities());
  
          // Add the registered features to the response
          for (String feature : getFeatures()) {
              response.addFeature(feature);
          }
          response.addExtension(extendedInfo);
      }
docs: Add discover info response data.
  
  @see <a href="http://xmpp.org/extensions/xep-0030.html#info-basic">XEP-30 Basic Protocol; Example 2</a>
  
  @param response the discover info response packet