com.cisco.provisioning.cpe.extensions.configuration
Interface TLV


public interface TLV

The TLV interface defines an immutable type-length-value object. TLV's are the low-level encoding representation of a DOCSIS option.

See Also:
OptionValue

Method Summary
 int getLength()
          Returns the value of the TLV's length field.
 int getLengthByteCount()
          Returns the number of length bytes used by the TLV.
 int getType()
          Returns the value of the TLV's type field.
 byte[] getValue()
          Returns the binary value of the TLV's value field as a byte array.
 String getValueString()
          Returns the TLV's string representation.
 boolean isFragmented()
          Returns whether the TLV is fragmented.
 byte[] toByteArray()
          Returns the TLV's binary representation.
 

Method Detail

toByteArray

byte[] toByteArray()
Returns the TLV's binary representation.

Returns:
the binary bytes of the TLV as a byte array.

getLength

int getLength()
Returns the value of the TLV's length field. For TLVs with no length field, zero is returned.

Returns:
the length field.

getType

int getType()
Returns the value of the TLV's type field.

Returns:
the type field.

getValue

byte[] getValue()
Returns the binary value of the TLV's value field as a byte array. For TLVs with no value field, a null object is returned

Returns:
the value field.

getValueString

String getValueString()
Returns the TLV's string representation. This is considered to be a string representing only the value portion of the TLV. Subclasses will override this member to provide an option specific representation of the value of the TLV.

Returns:
the TLV's string representation.

isFragmented

boolean isFragmented()
Returns whether the TLV is fragmented. Fragmented TLV's have values that exceed the maximum length permitted by the number of length bytes They are fragmented into multiple TLV's within the TLV instance.

Returns:
true if TLV is fragmented, otherwise false.

getLengthByteCount

int getLengthByteCount()
Returns the number of length bytes used by the TLV. For DOCSIS 1.0 and DOCSIS 1.1 this value is always 1.

Returns:
number of length bytes