Smack

org.jivesoftware.smackx.packet
Class IBBExtensions.Data

java.lang.Object
  extended by org.jivesoftware.smackx.packet.IBBExtensions.Data
All Implemented Interfaces:
PacketExtension
Enclosing class:
IBBExtensions

public static class IBBExtensions.Data
extends Object
implements PacketExtension

A data packet containing a portion of the file being sent encoded in base64.

Author:
Alexander Wenckus

Field Summary
static String ELEMENT_NAME
           
 
Constructor Summary
IBBExtensions.Data(String sid)
          A constructor.
IBBExtensions.Data(String sid, long seq, String data)
           
 
Method Summary
 String getData()
          Returns the data contained in this packet.
 String getElementName()
          Returns the root element name.
 String getNamespace()
          Returns the root element XML namespace.
 long getSeq()
          Returns the sequence of this packet in regard to the other data packets.
 String getSessionID()
          Returns the unique stream ID identifying this file transfer.
 void setData(String data)
          Sets the data contained in this packet.
 void setSeq(long seq)
          Sets the sequence of this packet.
 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
 

Field Detail

ELEMENT_NAME

public static final String ELEMENT_NAME
See Also:
Constant Field Values
Constructor Detail

IBBExtensions.Data

public IBBExtensions.Data(String sid)
A constructor.

Parameters:
sid - The stream ID.

IBBExtensions.Data

public IBBExtensions.Data(String sid,
                          long seq,
                          String data)
Method Detail

getSessionID

public String getSessionID()
Returns the unique stream ID identifying this file transfer.

Returns:
Returns the unique stream ID identifying this file transfer.

getNamespace

public String getNamespace()
Description copied from interface: PacketExtension
Returns the root element XML namespace.

Specified by:
getNamespace in interface PacketExtension
Returns:
the namespace.

getElementName

public String getElementName()
Description copied from interface: PacketExtension
Returns the root element name.

Specified by:
getElementName in interface PacketExtension
Returns:
the element name.

getData

public String getData()
Returns the data contained in this packet.

Returns:
Returns the data contained in this packet.

setData

public void setData(String data)
Sets the data contained in this packet.

Parameters:
data - The data encoded in base65

getSeq

public long getSeq()
Returns the sequence of this packet in regard to the other data packets.

Returns:
Returns the sequence of this packet in regard to the other data packets.

setSeq

public void setSeq(long seq)
Sets the sequence of this packet.

Parameters:
seq - A number between 0 and 65535

toXML

public String toXML()
Description copied from interface: PacketExtension
Returns the XML reppresentation of the PacketExtension.

Specified by:
toXML in interface PacketExtension
Returns:
the packet extension as XML.

Smack

Copyright © 2003-2007 Jive Software.