code: public void send(Roster roster, Jid targetUserID) throws NotConnectedException, InterruptedException {
          // Create a new message to send the roster
          Message msg = new Message(targetUserID);
          // Create a RosterExchange Package and add it to the message
          RosterExchange rosterExchange = new RosterExchange(roster);
          msg.addExtension(rosterExchange);
  
          XMPPConnection connection = weakRefConnection.get();
          // Send the message that contains the roster
          connection.sendStanza(msg);
      }
docs: Sends a roster to userID. All the entries of the roster will be sent to the
  target user.
  
  @param roster the roster to send
  @param targetUserID the user that will receive the roster entries
  @throws NotConnectedException
  @throws InterruptedException