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()
Gets the last modification time of the file.
|
java.lang.String |
getDescription()
Gets a sender-generated description of the file.
|
java.util.List<Hash> |
getHashes()
Gets the hashes of the file contents.
|
Jid |
getInitiator()
Gets the initiator.
|
java.lang.String |
getMimeType()
Gets the mime type of the file.
|
java.lang.String |
getName()
Gets the name of the file that the Sender wishes to send.
|
Range |
getRange()
Gets the range.
|
java.lang.String |
getSessionId() |
long |
getSize()
Gets the size, in bytes, of the data to be sent.
|
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()
FileTransferOffer
Gets the size, in bytes, of the data to be sent.
getSize
in interface FileTransferOffer
public java.lang.String getName()
FileTransferOffer
Gets the name of the file that the Sender wishes to send.
getName
in interface FileTransferOffer
public java.time.Instant getDate()
FileTransferOffer
Gets the last modification time of the file.
getDate
in interface FileTransferOffer
public java.util.List<Hash> getHashes()
FileTransferOffer
Gets the hashes of the file contents.
getHashes
in interface FileTransferOffer
public java.lang.String getDescription()
FileTransferOffer
Gets a sender-generated description of the file.
getDescription
in interface FileTransferOffer
public Range getRange()
FileTransferOffer
Gets the range.
getRange
in interface FileTransferOffer
public java.lang.String getSessionId()
Copyright © 2014–2019 XMPP.rocks. All rights reserved.