public final class FileTransferOfferEvent extends java.util.EventObject implements FileTransferOffer
| Modifier and Type | Method and Description |
|---|---|
AsyncResult<FileTransfer> |
accept(java.io.File target)
Accepts the inbound file transfer request.
|
AsyncResult<FileTransfer> |
accept(java.io.OutputStream outputStream)
Accepts the inbound file transfer request.
|
AsyncResult<FileTransfer> |
accept(java.nio.file.Path destination)
Accepts the inbound file transfer request.
|
java.time.Instant |
getDate() |
java.lang.String |
getDescription() |
java.util.List<Hash> |
getHashes() |
Jid |
getInitiator()
Gets the initiator.
|
java.lang.String |
getMimeType()
Gets the mime type of the file.
|
java.lang.String |
getName() |
Range |
getRange() |
java.lang.String |
getSessionId() |
long |
getSize() |
void |
reject()
Rejects the inbound file transfer request.
|
public java.lang.String getMimeType()
Gets the mime type of the file.
public Jid getInitiator()
Gets the initiator.
public AsyncResult<FileTransfer> accept(java.io.OutputStream outputStream)
Accepts the inbound file transfer request. After accepting the file transfer you should call FileTransfer.transfer() in order to start the transfer.
outputStream - The output stream, to which the file will be written.public final AsyncResult<FileTransfer> accept(java.nio.file.Path destination) throws java.io.IOException
Accepts the inbound file transfer request. After accepting the file transfer you should call FileTransfer.transfer() in order to start the transfer.
destination - The path of the file to be written.java.io.IOException - If the byte stream session could not be established.public final AsyncResult<FileTransfer> accept(java.io.File target) throws java.io.IOException
Accepts the inbound file transfer request. After accepting the file transfer you should call FileTransfer.transfer() in order to start the transfer.
target - The file to be written.java.io.IOException - If the byte stream session could not be established.public void reject()
Rejects the inbound file transfer request.
public long getSize()
getSize in interface FileTransferOfferpublic java.lang.String getName()
getName in interface FileTransferOfferpublic java.time.Instant getDate()
getDate in interface FileTransferOfferpublic java.util.List<Hash> getHashes()
getHashes in interface FileTransferOfferpublic java.lang.String getDescription()
getDescription in interface FileTransferOfferpublic Range getRange()
getRange in interface FileTransferOfferpublic java.lang.String getSessionId()
Copyright © 2014–2019 XMPP.rocks. All rights reserved.