org.jivesoftware.smackx.filetransfer.IncomingFileTransfer Java Examples
The following examples show how to use
org.jivesoftware.smackx.filetransfer.IncomingFileTransfer.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XMPPFileTransferRequest.java From saros with GNU General Public License v2.0 | 5 votes |
/** * Accept a incoming file transmission and save to provided file. * * @param file file to save transmission * @return {@link XMPPFileTransfer} with info about transmission status * @throws IOException if transmission fails */ public XMPPFileTransfer acceptFile(File file) throws IOException { try { IncomingFileTransfer transfer = request.accept(); transfer.recieveFile(file); return new XMPPFileTransfer(transfer); } catch (XMPPException e) { throw new IOException(e); } }
Example #2
Source File: XMPPFileTransferRequest.java From saros with GNU General Public License v2.0 | 5 votes |
/** * Accept a incoming file transmission and returns a InputStream with the received data. * * @return InputStream providing transmitted data * @throws IOException if transmission fails */ public InputStream acceptStream() throws IOException { try { IncomingFileTransfer transfer = request.accept(); return transfer.recieveFile(); } catch (XMPPException e) { throw new IOException(e); } }
Example #3
Source File: LiveApp.java From XMPPSample_Studio with Apache License 2.0 | 4 votes |
public void putFileTransfer(String path, IncomingFileTransfer fileTransfer) { fileTransfers.put(path, fileTransfer); }
Example #4
Source File: LiveApp.java From XMPPSample_Studio with Apache License 2.0 | 4 votes |
public IncomingFileTransfer getFileTransfer(String path) { return fileTransfers.get(path); }