Tlv (Tag-Length-Value)
public class Tlv
Extends: java.lang.Object
Tlv represents a Tag-Length-Value parameter in the SMPP protocol. These are optional fields attached to PDUs to provide extended or vendor-specific information. Each TLV consists of a tag (identifier), a length (in bytes), and a value (raw byte array). The Tlv class encapsulates this structure and provides methods to access its parts. Used throughout the Mobius SMPP implementation to manage optional parameters on both requests and responses.
Constructor:
public Tlv()
Creates an empty TLV instance. Fields can be set manually afterward.
public Tlv(short tag, byte[] value)
tag – The TLV identifier (as defined by SMPP or vendor-specific extensions).
value – The raw binary data associated with the tag.
Initializes a TLV with the specified tag and value.
Methods:
short getTag() | Returns the TLV tag. |
byte[] getValue() | Returns the value associated with the TLV. |
int calculateLength() | Returns the total byte length of the TLV, including header and value. |
Methods inherited from class java.lang.Object |
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Start innovating with Mobius
What's next? Let's talk!