code: public void setPrivateData(final PrivateData privateData) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
          // Create an IQ packet to set the private data.
          IQ privateDataSet = new PrivateDataIQ(privateData);
  
          connection().createStanzaCollectorAndSend(privateDataSet).nextResultOrThrow();
      }
docs: Sets a private data value. Each chunk of private data is uniquely identified by an
  element name and namespace pair. If private data has already been set with the
  element name and namespace, then the new private data will overwrite the old value.
  
  @param privateData the private data.
  @throws XMPPErrorException
  @throws NoResponseException
  @throws NotConnectedException
  @throws InterruptedException