code: public boolean contactSupportsOxInstantMessaging(BareJid jid)
              throws XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException,
              SmackException.NoResponseException {
          return ServiceDiscoveryManager.getInstanceFor(connection()).supportsFeature(jid, NAMESPACE_0);
      }
docs: Determine, whether a contact announces support for XEP-0374: OpenPGP for XMPP: Instant Messaging.
  
  @param jid {@link BareJid} of the contact in question.
  @return true if contact announces support, otherwise false.
  
  @throws XMPPException.XMPPErrorException in case of an XMPP protocol error
  @throws SmackException.NotConnectedException if we are not connected
  @throws InterruptedException if the thread gets interrupted
  @throws SmackException.NoResponseException if the server doesn't respond