net.jolsrv2.data
Class TlvBlock

java.lang.Object
  extended by net.jolsrv2.data.TlvBlock

public class TlvBlock
extends java.lang.Object

The class implements the TLV block, as specified in OLSRv2.

Author:
Andreas Schjønhaug

Constructor Summary
TlvBlock()
          Empty constructor
TlvBlock(java.util.ArrayList<Tlv> tlvs)
          Constructor
 
Method Summary
 void add(Tlv tlv)
          Adds a TLV to the TLV block
 byte[] getBytes()
          Returns the bytes of the TLV block
 java.util.ArrayList<Tlv> getTlvs()
          Returns the TLVs in the TLV block
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TlvBlock

public TlvBlock()
Empty constructor


TlvBlock

public TlvBlock(java.util.ArrayList<Tlv> tlvs)
Constructor

Parameters:
tlvs - the TLVs to be put in the TLV block
Method Detail

add

public void add(Tlv tlv)
Adds a TLV to the TLV block

Parameters:
tlv - the TLV

getTlvs

public java.util.ArrayList<Tlv> getTlvs()
Returns the TLVs in the TLV block

Returns:
the TLVs

getBytes

public byte[] getBytes()
Returns the bytes of the TLV block

Returns:
the bytes of the TLV block