Class SIFileTransferOffer
- java.lang.Object
-
- rocks.xmpp.extensions.si.profile.filetransfer.model.SIFileTransferOffer
-
- All Implemented Interfaces:
FileTransferOffer
public final class SIFileTransferOffer extends Object implements FileTransferOffer
The implementation of the file transfer profile, i.e. the<file/>
element.This class is immutable.
- See Also:
- XEP-0096: SI File Transfer, XML Schema
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SIFileTransferOffer.SIRange
Allows to do ranged transfers.
-
Constructor Summary
Constructors Constructor Description SIFileTransferOffer(String name, long size)
SIFileTransferOffer(String name, long size, Instant lastModified, String hash, String description, SIFileTransferOffer.SIRange range)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 MD5 sum of the file contents.String
getName()
Gets the name of the file that the Sender wishes to send.Range
getRange()
Gets the range.long
getSize()
Gets the size, in bytes, of the data to be sent.
-
-
-
Field Detail
-
NAMESPACE
public static final String NAMESPACE
http://jabber.org/protocol/si/profile/file-transfer- See Also:
- Constant Field Values
-
-
Method Detail
-
getSize
public final long getSize()
Gets the size, in bytes, of the data to be sent.- Specified by:
getSize
in interfaceFileTransferOffer
- Returns:
- The size.
-
getName
public final String getName()
Gets the name of the file that the Sender wishes to send.- Specified by:
getName
in interfaceFileTransferOffer
- Returns:
- The file name.
-
getDate
public final Instant getDate()
Gets the last modification time of the file.- Specified by:
getDate
in interfaceFileTransferOffer
- Returns:
- The date.
-
getHashes
public final List<Hash> getHashes()
Gets the MD5 sum of the file contents.- Specified by:
getHashes
in interfaceFileTransferOffer
- Returns:
- The MD5 sum.
-
getDescription
public final String getDescription()
Gets a sender-generated description of the file.- Specified by:
getDescription
in interfaceFileTransferOffer
- Returns:
- The description.
-
getRange
public final Range getRange()
Gets the range.- Specified by:
getRange
in interfaceFileTransferOffer
- Returns:
- The range.
-
-