| Package | org.igniterealtime.xiff.data.si |
| Class | public class FileTransferExtension |
| Inheritance | FileTransferExtension Extension XMLStanza ExtensionContainer Object |
| Implements | IExtension |
To be used within XEP-0095: Stream Initiation
See also
| Property | Defined By | ||
|---|---|---|---|
| date : Date
The last modification time of the file. | FileTransferExtension | ||
| desc : String
Used to provide a sender-generated description of the file so the receiver
can better understand what is being sent. | FileTransferExtension | ||
| hash : String
The MD5 sum of the file contents. | FileTransferExtension | ||
| hasRange : Boolean
When range is sent in the offer, it should have no attributes. | FileTransferExtension | ||
| name : String
The name of the file that the Sender wishes to send. | FileTransferExtension | ||
| rangeLength : uint
Specifies the number of bytes to retrieve starting at offset. | FileTransferExtension | ||
| rangeOffset : uint
Specifies the position, in bytes, to start transferring the file data from. | FileTransferExtension | ||
| size : uint
The size, in bytes, of the data to be sent. | FileTransferExtension | ||
![]() | xml : XML [override]
Override in order to take care of setting the Namespace and
checking for containing extensions. | Extension | |
| Method | Defined By | ||
|---|---|---|---|
FileTransferExtension(parent:XML = null)
The size and name attributes MUST be present in the profile. | FileTransferExtension | ||
![]() |
Add extension to the list of the given namespace and insert to the XML element as a child. | ExtensionContainer | |
![]() | getAllExtensions():Array | ExtensionContainer | |
![]() | getAllExtensionsByNS(nameSpace:String):Array | ExtensionContainer | |
![]() | getAttribute(name:String):String
Convinience method for getting element value from the XML. | XMLStanza | |
![]() | getChildAttribute(elem:String, name:String):String
Convinience method for getting child element attribute value from the XML. | XMLStanza | |
![]() | getChildField(elem:String, name:String):String
Convinience method for getting child element value from the XML. | XMLStanza | |
getElementName():String | FileTransferExtension | ||
![]() | getExtension(elementName:String):IExtension
Get the extension having the given element name. | ExtensionContainer | |
![]() | getField(name:String):String
Convinience method for getting element value from the XML. | XMLStanza | |
getNS():String | FileTransferExtension | ||
![]() | remove():void
Removes the extension from its parent. | Extension | |
![]() | removeAllExtensions(nameSpace:String):void | ExtensionContainer | |
![]() | removeExtension(extension:IExtension):Boolean | ExtensionContainer | |
![]() | removeFields(name:String):void
Helper method for removing all child elements that have the given name. | XMLStanza | |
![]() | setAttribute(name:String, value:String):void
Convinience method for setting a value to a element in the XML. | XMLStanza | |
![]() | setChildAttribute(elem:String, name:String, value:String):void
Convinience method for setting an attribute for a child element of the XML. | XMLStanza | |
![]() | setChildField(elem:String, name:String, value:String):void
Convinience method for setting a value for a child element of the XML. | XMLStanza | |
![]() | setField(name:String, value:String):void
Convinience method for setting a value to a element in the XML. | XMLStanza | |
![]() | toString():String
Converts the base stanza XML to a string. | XMLStanza | |
| Constant | Defined By | ||
|---|---|---|---|
![]() | DEFAULT_NS : Namespace [static]
Default XML namespace. | XMLStanza | |
| ELEMENT_NAME : String = file [static] | FileTransferExtension | ||
![]() | FLASH_NS : Namespace [static]
| XMLStanza | |
| NS : String = http://jabber.org/protocol/si/profile/file-transfer [static] | FileTransferExtension | ||
![]() | STREAM_NS : Namespace [static]
| XMLStanza | |
| date | property |
date:DateThe last modification time of the file.
This is specified using the DateTime profile as described in XMPP Date and Time Profiles.
public function get date():Date public function set date(value:Date):voidSee also
| desc | property |
desc:StringUsed 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.
public function get desc():String public function set desc(value:String):void| hash | property |
hash:StringThe MD5 sum of the file contents.
public function get hash():String public function set hash(value:String):void| hasRange | property |
hasRange:Boolean
When range is sent in the offer, it should have no attributes.
This signifies that the sender can do ranged transfers.
Both rangeOffset and rangeLength 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.
public function get hasRange():Boolean public function set hasRange(value:Boolean):void| name | property |
name:StringThe name of the file that the Sender wishes to send.
REQUIRED
public function get name():String public function set name(value:String):void| rangeLength | property |
rangeLength:uintSpecifies the number of bytes to retrieve starting at offset. This defaults to the length of the file from offset to the end.
When a Stream Initiation result is sent with the range element, it uses this property.
public function get rangeLength():uint public function set rangeLength(value:uint):void| rangeOffset | property |
rangeOffset:uintSpecifies the position, in bytes, to start transferring the file data from. This defaults to zero (0) if not specified.
When a Stream Initiation result is sent with the range element, it uses this property.
public function get rangeOffset():uint public function set rangeOffset(value:uint):void| size | property |
size:uintThe size, in bytes, of the data to be sent.
REQUIRED
public function get size():uint public function set size(value:uint):void| FileTransferExtension | () | Constructor |
public function FileTransferExtension(parent:XML = null)The size and name attributes MUST be present in the profile. The other attributes MAY be present.
There are two possible child elements of the root: 'desc' and 'range'. Both are OPTIONAL.
Parametersparent:XML (default = null) |
| getElementName | () | method |
public function getElementName():StringReturnsString |
| getNS | () | method |
public function getNS():StringReturnsString |
| ELEMENT_NAME | Constant |
public static const ELEMENT_NAME:String = file| NS | Constant |
public static const NS:String = http://jabber.org/protocol/si/profile/file-transfer