public final class FileTransferOfferEvent extends EventObject implements FileTransferOffer
| Modifier and Type | Method and Description |
|---|---|
AsyncResult<FileTransfer> |
accept(File target)
Accepts the inbound file transfer request.
|
AsyncResult<FileTransfer> |
accept(OutputStream outputStream)
Accepts the inbound file transfer request.
|
AsyncResult<FileTransfer> |
accept(Path destination)
Accepts the inbound file transfer request.
|
Instant |
getDate()
Gets the last modification time of the file.
|
String |
getDescription()
Gets a sender-generated description of the file.
|
List<Hash> |
getHashes()
Gets the hashes of the file contents.
|
rocks.xmpp.addr.Jid |
getInitiator()
Gets the initiator.
|
String |
getMimeType()
Gets the mime type of the file.
|
String |
getName()
Gets the name of the file that the Sender wishes to send.
|
Range |
getRange()
Gets the range.
|
String |
getSessionId() |
long |
getSize()
Gets the size, in bytes, of the data to be sent.
|
void |
reject()
Rejects the inbound file transfer request.
|
getSource, toStringpublic String getMimeType()
public rocks.xmpp.addr.Jid getInitiator()
public AsyncResult<FileTransfer> accept(OutputStream outputStream)
FileTransfer.transfer() in order to start the transfer.outputStream - The output stream, to which the file will be written.public final AsyncResult<FileTransfer> accept(Path destination) throws IOException
FileTransfer.transfer() in order to start the transfer.destination - The path of the file to be written.IOException - If the byte stream session could not be established.public final AsyncResult<FileTransfer> accept(File target) throws IOException
FileTransfer.transfer() in order to start the transfer.target - The file to be written.IOException - If the byte stream session could not be established.public void reject()
public long getSize()
FileTransferOffergetSize in interface FileTransferOfferpublic String getName()
FileTransferOffergetName in interface FileTransferOfferpublic Instant getDate()
FileTransferOffergetDate in interface FileTransferOfferpublic List<Hash> getHashes()
FileTransferOffergetHashes in interface FileTransferOfferpublic String getDescription()
FileTransferOffergetDescription in interface FileTransferOfferpublic Range getRange()
FileTransferOffergetRange in interface FileTransferOfferpublic String getSessionId()
Copyright © 2014–2016 XMPP.rocks. All rights reserved.