code: public Version getVersion(Jid jid) throws NoResponseException, XMPPErrorException,
                      NotConnectedException, InterruptedException {
          if (!isSupported(jid)) {
              return null;
          }
          return connection().createStanzaCollectorAndSend(new Version(jid)).nextResultOrThrow();
      }
docs: Request version information from a given JID.
  
  @param jid
  @return the version information or {@code null} if not supported by JID
  @throws NoResponseException
  @throws XMPPErrorException
  @throws NotConnectedException
  @throws InterruptedException