code: public static boolean isServiceEnabled(XMPPConnection connection, Jid userID)
                      throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
          return ServiceDiscoveryManager.getInstanceFor(connection).supportsFeature(userID, XHTMLExtension.NAMESPACE);
      }
docs: Returns true if the specified user handles XHTML messages.
  
  @param connection the connection to use to perform the service discovery
  @param userID the user to check. A fully qualified xmpp ID, e.g. jdoe@example.com
  @return a boolean indicating whether the specified user handles XHTML messages
  @throws XMPPErrorException
  @throws NoResponseException
  @throws NotConnectedException
  @throws InterruptedException