|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hypercast.Extension
This class defines the function of OL_Message extension header. It contains extension type information and provides method to create an extension. Each concrete extension extends this class and implements the abstract methods defined in this class.
Field Summary | |
static byte |
FSM
|
static byte |
HEADER_NONE
Extension type values. |
static byte |
RAW_DATA
|
static byte |
ROUTE_RECORD
|
static byte |
SECURITY
|
Constructor Summary | |
Extension()
|
Method Summary | |
abstract hypercast.Extension |
Clone()
Return a new extension instance by cloning this extension. |
static hypercast.Extension |
createExtension(byte extensiontype,
byte[] contents)
Constructs an Extension header object. |
static hypercast.Extension |
createExtension(byte extensiontype,
byte[] contents,
hypercast.I_Node node)
Constructs an Extension header object. |
static hypercast.Extension |
createExtension(byte extensiontype,
byte[] contents,
hypercast.I_Node node,
hypercast.KeyVault kv)
Constructs an Extension header object. |
static hypercast.Extension |
createExtension(byte extensiontype,
byte[] contents,
hypercast.I_Node node,
hypercast.KeyVault kv,
boolean isEncryptedFlag)
Constructs an Extension header object. |
static hypercast.Extension |
createExtension(byte extensiontype,
byte[] contents,
hypercast.KeyVault kv)
Constructs an Extension header object. |
abstract byte |
getExtensionType()
Return the value of the extension type field. |
abstract int |
getSize()
Return the length of the byte array of this extension. |
static boolean |
isValidHeader(byte extensiontype)
Check a specified extension type is a valid one. |
abstract byte[] |
toByteArray()
Convert this extension to a byte array. |
java.lang.String |
toString()
|
static java.lang.String |
typeToString(byte type)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final byte HEADER_NONE
public static final byte FSM
public static final byte RAW_DATA
public static final byte ROUTE_RECORD
public static final byte SECURITY
Constructor Detail |
public Extension()
Method Detail |
public static java.lang.String typeToString(byte type)
public static hypercast.Extension createExtension(byte extensiontype, byte[] contents)
extensiontype
- type of the extension to be created.contents
- byte array used to creat the extension.public static hypercast.Extension createExtension(byte extensiontype, byte[] contents, hypercast.I_Node node)
extensiontype
- type of the extension to be created.contents
- byte array used to creat the extension.node
- I_Node object needed to construct logical address when
an extension is created.public static hypercast.Extension createExtension(byte extensiontype, byte[] contents, hypercast.KeyVault kv)
extensiontype
- type of the extension to be created.contents
- byte array used to creat the extension.kv
- key vault for security computation.public static hypercast.Extension createExtension(byte extensiontype, byte[] contents, hypercast.I_Node node, hypercast.KeyVault kv)
extensiontype
- type of the extension to be created.contents
- byte array used to creat the extension.node
- I_Node object needed to construct logical address when
an extension is created.kv
- key vault for security computation.public static hypercast.Extension createExtension(byte extensiontype, byte[] contents, hypercast.I_Node node, hypercast.KeyVault kv, boolean isEncryptedFlag)
extensiontype
- type of the extension to be created.contents
- byte array used to creat the extension.node
- I_Node object needed to construct logical address when
an extension is created.kv
- key vault for security computation.isEncryptedFlag
- flag showing the given byte array is encrypted or plaintext.
True means encrypted, false means plaintext.public static boolean isValidHeader(byte extensiontype)
extensiontype
- extension type to be checked.public abstract byte getExtensionType()
public abstract byte[] toByteArray()
public abstract int getSize()
public abstract hypercast.Extension Clone()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |