Package org.jivesoftware.smackx.filetransfer

Examples of org.jivesoftware.smackx.filetransfer.OutgoingFileTransfer.sendFile()


        "Please Provide a description of the file (" + f.getName() + ") " +
          "you want to send to " + user,
        "",null);
    if(descriptionInput.open() != InputDialog.OK) return false;
    try {
      outgoingFileTransfer.sendFile(f,descriptionInput.getValue());
     
      final String task = "Sending file " + f.getName() + " to " + user;
      showProgressMonitor(parent, outgoingFileTransfer, task);
    } catch (Exception e) {
      throw new RuntimeException("Error while trying to send file.",e);
View Full Code Here


        OutgoingFileTransfer transfer = manager.createOutgoingFileTransfer(strJidreceiver);

        OpenDialog opendialogsendfile = new OpenDialog(true);
        if (opendialogsendfile.getAbortedStatus() != true){
            try {
                transfer.sendFile(new File(opendialogsendfile.getCompletePath()),opendialogsendfile.getFileDescription());
                new Progress((int) transfer.getFileSize(), chatwindow, transfer);
            }
            catch (XMPPException e) {
                e.printStackTrace();
            }
View Full Code Here

   
  }

  void send(String recver,File file) throws XMPPException{
    OutgoingFileTransfer outTransfer = fileTransferManager.createOutgoingFileTransfer(recver);
    outTransfer.sendFile(file, "");
  }
 
  void send(String recver,String filepath) throws XMPPException{
    File toSendFile = new File(filepath);
    send(recver,toSendFile);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.