public final class SIFileTransferOffer extends java.lang.Object implements FileTransferOffer
The implementation of the file transfer profile, i.e. the <file/>
element.
This class is immutable.
Modifier and Type | Class and Description |
---|---|
static class |
SIFileTransferOffer.SIRange
Allows to do ranged transfers.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAMESPACE
|
Constructor and Description |
---|
SIFileTransferOffer(java.lang.String name,
long size) |
SIFileTransferOffer(java.lang.String name,
long size,
java.time.Instant lastModified,
java.lang.String hash,
java.lang.String description,
SIFileTransferOffer.SIRange range) |
Modifier and Type | Method and Description |
---|---|
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 MD5 sum of the file contents.
|
java.lang.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.
|
public static final java.lang.String NAMESPACE
public SIFileTransferOffer(java.lang.String name, long size)
public SIFileTransferOffer(java.lang.String name, long size, java.time.Instant lastModified, java.lang.String hash, java.lang.String description, SIFileTransferOffer.SIRange range)
public final long getSize()
Gets the size, in bytes, of the data to be sent.
getSize
in interface FileTransferOffer
public final java.lang.String getName()
Gets the name of the file that the Sender wishes to send.
getName
in interface FileTransferOffer
public final java.time.Instant getDate()
Gets the last modification time of the file.
getDate
in interface FileTransferOffer
public final java.util.List<Hash> getHashes()
Gets the MD5 sum of the file contents.
getHashes
in interface FileTransferOffer
public final java.lang.String getDescription()
Gets a sender-generated description of the file.
getDescription
in interface FileTransferOffer
public final Range getRange()
Gets the range.
getRange
in interface FileTransferOffer
Copyright © 2014–2019 XMPP.rocks. All rights reserved.