Packageorg.igniterealtime.xiff.data.si
Classpublic class FileTransferExtension
InheritanceFileTransferExtension Inheritance Extension Inheritance XMLStanza Inheritance ExtensionContainer Inheritance Object
Implements IExtension

XEP-0096: SI File Transfer.

To be used within XEP-0095: Stream Initiation

See also

http://xmpp.org/extensions/xep-0096.html


Public Properties
 PropertyDefined 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
 Inheritedxml : XML
[override] Override in order to take care of setting the Namespace and checking for containing extensions.
Extension
Public Methods
 MethodDefined By
  
FileTransferExtension(parent:XML = null)
The size and name attributes MUST be present in the profile.
FileTransferExtension
 Inherited
Add extension to the list of the given namespace and insert to the XML element as a child.
ExtensionContainer
 Inherited
ExtensionContainer
 Inherited
getAllExtensionsByNS(nameSpace:String):Array
ExtensionContainer
 Inherited
getAttribute(name:String):String
Convinience method for getting element value from the XML.
XMLStanza
 Inherited
getChildAttribute(elem:String, name:String):String
Convinience method for getting child element attribute value from the XML.
XMLStanza
 Inherited
getChildField(elem:String, name:String):String
Convinience method for getting child element value from the XML.
XMLStanza
  
FileTransferExtension
 Inherited
getExtension(elementName:String):IExtension
Get the extension having the given element name.
ExtensionContainer
 Inherited
getField(name:String):String
Convinience method for getting element value from the XML.
XMLStanza
  
getNS():String
FileTransferExtension
 Inherited
remove():void
Removes the extension from its parent.
Extension
 Inherited
removeAllExtensions(nameSpace:String):void
ExtensionContainer
 Inherited
removeExtension(extension:IExtension):Boolean
ExtensionContainer
 Inherited
removeFields(name:String):void
Helper method for removing all child elements that have the given name.
XMLStanza
 Inherited
setAttribute(name:String, value:String):void
Convinience method for setting a value to a element in the XML.
XMLStanza
 Inherited
setChildAttribute(elem:String, name:String, value:String):void
Convinience method for setting an attribute for a child element of the XML.
XMLStanza
 Inherited
setChildField(elem:String, name:String, value:String):void
Convinience method for setting a value for a child element of the XML.
XMLStanza
 Inherited
setField(name:String, value:String):void
Convinience method for setting a value to a element in the XML.
XMLStanza
 Inherited
toString():String
Converts the base stanza XML to a string.
XMLStanza
Public Constants
 ConstantDefined By
 InheritedDEFAULT_NS : Namespace
[static] Default XML namespace.
XMLStanza
  ELEMENT_NAME : String = file
[static]
FileTransferExtension
 InheritedFLASH_NS : Namespace
[static]
XMLStanza
  NS : String = http://jabber.org/protocol/si/profile/file-transfer
[static]
FileTransferExtension
 InheritedSTREAM_NS : Namespace
[static]
XMLStanza
Property Detail
dateproperty
date:Date

The last modification time of the file.

This is specified using the DateTime profile as described in XMPP Date and Time Profiles.


Implementation
    public function get date():Date
    public function set date(value:Date):void

See also

descproperty 
desc:String

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.


Implementation
    public function get desc():String
    public function set desc(value:String):void
hashproperty 
hash:String

The MD5 sum of the file contents.


Implementation
    public function get hash():String
    public function set hash(value:String):void
hasRangeproperty 
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.


Implementation
    public function get hasRange():Boolean
    public function set hasRange(value:Boolean):void
nameproperty 
name:String

The name of the file that the Sender wishes to send.

REQUIRED


Implementation
    public function get name():String
    public function set name(value:String):void
rangeLengthproperty 
rangeLength:uint

Specifies 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.


Implementation
    public function get rangeLength():uint
    public function set rangeLength(value:uint):void
rangeOffsetproperty 
rangeOffset:uint

Specifies 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.


Implementation
    public function get rangeOffset():uint
    public function set rangeOffset(value:uint):void
sizeproperty 
size:uint

The size, in bytes, of the data to be sent.

REQUIRED


Implementation
    public function get size():uint
    public function set size(value:uint):void
Constructor Detail
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.

Parameters
parent:XML (default = null)
Method Detail
getElementName()method
public function getElementName():String

Returns
String
getNS()method 
public function getNS():String

Returns
String
Constant Detail
ELEMENT_NAMEConstant
public static const ELEMENT_NAME:String = file

NSConstant 
public static const NS:String = http://jabber.org/protocol/si/profile/file-transfer