hypercast
Class PayloadExtension

java.lang.Object
  |
  +--hypercast.Extension
        |
        +--hypercast.PayloadExtension
Direct Known Subclasses:
EncryptedPayloadExtension

public class PayloadExtension
extends Extension

This class defines the OL_Message extension with type RAW_DATA. It carries the application data. Only one this type of extension can be defined in an overlay message.


Field Summary
 
Fields inherited from class hypercast.Extension
FSM, HEADER_NONE, RAW_DATA, ROUTE_RECORD, SECURITY
 
Constructor Summary
PayloadExtension()
          Constructs an empty Extension
PayloadExtension(byte[] payload)
          Constructs an Extension header object with all the parameters
PayloadExtension(hypercast.PayloadExtension e)
          Constructs an Extension from an existing one
 
Method Summary
 hypercast.Extension Clone()
          Return a new PayloadExtension extension instance by cloning this extension.
 byte getExtensionType()
          Returns the type of extension.
 byte[] getPayload()
          Returns the payload
 int getSize()
          Returns the length of the byte array of this extension.
 void setPayload(byte[] payload)
          Sets the payload
 byte[] toByteArray()
          Converts this object to byte array.
 
Methods inherited from class hypercast.Extension
createExtension, createExtension, createExtension, createExtension, createExtension, isValidHeader, toString, typeToString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PayloadExtension

public PayloadExtension(byte[] payload)
Constructs an Extension header object with all the parameters


PayloadExtension

public PayloadExtension(hypercast.PayloadExtension e)
Constructs an Extension from an existing one


PayloadExtension

public PayloadExtension()
Constructs an empty Extension

Method Detail

Clone

public hypercast.Extension Clone()
Return a new PayloadExtension extension instance by cloning this extension.

Specified by:
Clone in class Extension

getExtensionType

public byte getExtensionType()
Returns the type of extension.

Specified by:
getExtensionType in class Extension

toByteArray

public byte[] toByteArray()
Converts this object to byte array.

Specified by:
toByteArray in class Extension

getSize

public int getSize()
Returns the length of the byte array of this extension.

Specified by:
getSize in class Extension

getPayload

public byte[] getPayload()
Returns the payload


setPayload

public void setPayload(byte[] payload)
Sets the payload