public class TlvUtil extends Object
| Constructor and Description |
|---|
TlvUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Tlv |
createFixedLengthStringTlv(short tag,
String value,
int fixedLength)
Writes a fixed length String TLV with null bytes filling the remaining
part of the byte array.
|
static Tlv |
createFixedLengthStringTlv(short tag,
String value,
int fixedLength,
String charsetName)
Writes a fixed length String TLV with null bytes filling the remaining
part of the byte array.
|
static Tlv |
createNullTerminatedStringTlv(short tag,
String value)
Writes a variable length C-String (null terminated) TLV.
|
static Tlv |
createNullTerminatedStringTlv(short tag,
String value,
String charsetName)
Writes a variable length C-String (null terminated) TLV.
|
public static Tlv createNullTerminatedStringTlv(short tag, String value) throws TlvConvertException
tag - The TLV tag valuevalue - The String to include in the TLV valueTlvConvertException - Thrown if there is an error during conversion
of the value into TLV.public static Tlv createNullTerminatedStringTlv(short tag, String value, String charsetName) throws TlvConvertException
tag - The TLV tag valuevalue - The String to include in the TLV valuecharsetName - The charsetName to use to convert the String into bytesTlvConvertException - Thrown if there is an error during conversion
of the value into TLV.public static Tlv createFixedLengthStringTlv(short tag, String value, int fixedLength) throws TlvConvertException
tag - The TLV tag valuevalue - The String to include in the TLV valuefixedLength - The fixed length of the byte array value of the TLVTlvConvertException - Thrown if there is an error during conversion
of the value into TLV.public static Tlv createFixedLengthStringTlv(short tag, String value, int fixedLength, String charsetName) throws TlvConvertException
tag - The TLV tag valuevalue - The String to include in the TLV valuefixedLength - The fixed length of the byte array value of the TLVcharsetName - The charsetName to use to convert the String into bytesTlvConvertException - Thrown if there is an error during conversion
of the value into TLV.Copyright © 2009-2014 Cloudhopper by Twitter. All Rights Reserved.