Package org.jivesoftware.smackx.filetransfer

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


        try {
          URL url = new URL(attachmentUrl);
          // Send the file
          is = url.openStream();
          OutgoingFileTransfer.setResponseTimeout(10000);
          transfer.sendStream(is, url.getFile(), is.available(), message);
          logger.debug("Sent message '{}' with attachment '{}' to '{}'.", new String[] { message, attachmentUrl, to });
          success = true;
        } catch (IOException e) {
          logger.error("Could not open url '{}' for sending it via XMPP", attachmentUrl, e);
        } finally {
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.