* Returns the binary TLV created from tag, length and binary data value
* carried by this TLV.
*/
public ByteBuffer getData() throws ValueNotSetException {
if (hasValue()) {
ByteBuffer tlvBuf = new ByteBuffer();
tlvBuf.appendShort(getTag());
tlvBuf.appendShort(encodeUnsigned(getLength()));
tlvBuf.appendBuffer(getValueData());
return tlvBuf;
} else {
return null;
}
}