code: public boolean isSupported() throws NoResponseException, NotConnectedException,
                      InterruptedException, XMPPErrorException {
          // This is just a primitive hack, since XEP-49 does not specify a way to determine if the
          // service supports it
          try {
              setPrivateData(DUMMY_PRIVATE_DATA);
              return true;
          }
          catch (XMPPErrorException e) {
              if (e.getStanzaError().getCondition() == Condition.service_unavailable) {
                  return false;
              }
              else {
                  throw e;
              }
          }
      }
docs: Check if the service supports private data.
  
  @return true if the service supports private data, false otherwise.
  @throws NoResponseException
  @throws NotConnectedException
  @throws InterruptedException
  @throws XMPPErrorException
  @since 4.2