|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jivesoftware.smackx.packet.StreamInitiation.File
public static class StreamInitiation.File
<desc> is used to provide a sender-generated description of the file so the receiver can better understand what is being sent. It MUST NOT be sent in the result.
When <range> is sent in the offer, it should have no attributes.
This signifies that the sender can do ranged transfers. When a Stream
Initiation result is sent with the
Both attributes are OPTIONAL on the <range> element. Sending no attributes is synonymous with not sending the <range> element. When no <range> element is sent in the Stream Initiation result, the Sender MUST send the complete file starting at offset 0. More generally, data is sent over the stream byte for byte starting at the offset position for the length specified.
Constructor Summary | |
---|---|
StreamInitiation.File(String name,
long size)
Constructor providing the name of the file and its size. |
Method Summary | |
---|---|
Date |
getDate()
Returns the date that the file was last modified. |
String |
getDesc()
Returns the description of the file. |
String |
getElementName()
Returns the root element name. |
String |
getHash()
Returns the MD5 sum of the file's contents |
String |
getName()
Returns the file's name. |
String |
getNamespace()
Returns the root element XML namespace. |
long |
getSize()
Returns the file's size. |
boolean |
isRanged()
Returns whether or not the initiator can support a range for the file tranfer. |
void |
setDate(Date date)
Sets the date that the file was last modified. |
void |
setDesc(String desc)
Sets the description of the file. |
void |
setHash(String hash)
Sets the MD5 sum of the file's contents |
void |
setRanged(boolean isRanged)
True if a range can be provided and false if it cannot. |
String |
toXML()
Returns the XML reppresentation of the PacketExtension. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StreamInitiation.File(String name, long size)
name
- The name of the file.size
- The size of the file in bytes.Method Detail |
---|
public String getName()
public long getSize()
public void setHash(String hash)
hash
- The MD5 sum of the file's contents.public String getHash()
public void setDate(Date date)
date
- The date that the file was last modified.public Date getDate()
public void setDesc(String desc)
desc
- The description of the file so that the file reciever can
know what file it is.public String getDesc()
public void setRanged(boolean isRanged)
isRanged
- True if a range can be provided and false if it cannot.public boolean isRanged()
public String getElementName()
PacketExtension
getElementName
in interface PacketExtension
public String getNamespace()
PacketExtension
getNamespace
in interface PacketExtension
public String toXML()
PacketExtension
toXML
in interface PacketExtension
|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |