Saros
Distributed Collaborative Editing and Distributed Party Programming
de.fu_berlin.inf.dpp.net.internal.BinaryXMPPExtension Class Reference

List of all members.

Public Member Functions

 BinaryXMPPExtension (ConnectionMode transferMode, TransferDescription transferDescription, int chunkCount)
TransferDescription getTransferDescription ()

Package Functions

byte[] getPayload ()
ConnectionMode getTransferMode ()
long getCompressedSize ()
long getUncompressedSize ()
long getTransferDuration ()
void setPayload (long originalSize, byte[] data)
boolean isLastChunk ()

Constructor & Destructor Documentation

de.fu_berlin.inf.dpp.net.internal.BinaryXMPPExtension.BinaryXMPPExtension ( ConnectionMode  transferMode,
TransferDescription  transferDescription,
int  chunkCount 
)

Member Function Documentation

long de.fu_berlin.inf.dpp.net.internal.BinaryXMPPExtension.getCompressedSize ( ) [package]

Returns the size of the XMPP packet extension in bytes before decompression.

byte [] de.fu_berlin.inf.dpp.net.internal.BinaryXMPPExtension.getPayload ( ) [package]

Returns the XMPP packet extension in binary form. Note:The returned byte array must not be modified directly.

TransferDescription de.fu_berlin.inf.dpp.net.internal.BinaryXMPPExtension.getTransferDescription ( )

Returns the transfer description of this transfer object.

long de.fu_berlin.inf.dpp.net.internal.BinaryXMPPExtension.getTransferDuration ( ) [package]

Returns the time in milliseconds until the transfer was completed.

ConnectionMode de.fu_berlin.inf.dpp.net.internal.BinaryXMPPExtension.getTransferMode ( ) [package]

Returns the ConnectionMode that was used to receive theXMPP packet extension.

long de.fu_berlin.inf.dpp.net.internal.BinaryXMPPExtension.getUncompressedSize ( ) [package]

Returns the size of the XMPP packet extension in bytes after decompression.

boolean de.fu_berlin.inf.dpp.net.internal.BinaryXMPPExtension.isLastChunk ( ) [package]

Checks if all outstanding chunks have arrived. This method must be called after a chunk has been received.

Returns:
true if setPayload can now be called, false otherwise
void de.fu_berlin.inf.dpp.net.internal.BinaryXMPPExtension.setPayload ( long  originalSize,
byte[]  data 
) [package]

Sets the data for this XMPP packet extension.

Parameters:
originalSizethe original size of the received data
datathe binary form of the XMPP packet extension
Exceptions:
IllegalStateExceptionif there are still missing chunks, see also isLastChunk
 All Classes Namespaces Files Functions Variables Enumerations