Package de.cardcontact.tlv
Class UTF8String
- java.lang.Object
-
- de.cardcontact.tlv.TLV
-
- de.cardcontact.tlv.PrimitiveTLV
-
- de.cardcontact.tlv.UTF8String
-
- All Implemented Interfaces:
TreeNode
public class UTF8String extends PrimitiveTLV
-
-
Field Summary
-
Fields inherited from class de.cardcontact.tlv.PrimitiveTLV
value
-
Fields inherited from class de.cardcontact.tlv.TLV
alternateLengthFormat, name, tag
-
-
Constructor Summary
Constructors Constructor Description UTF8String(ParseBuffer pb)
Create PrintableString from binary presentationUTF8String(TLV tlv)
Copy constructor to convert PrimitiveTLV to typed object Make sure, that the parent is updated with the new referenceUTF8String(java.lang.String str)
Create PrintableString object
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static UTF8String
getInstance(TLV tlv)
Convert - if needed - the PrimitiveTLV to a UTF8Stringstatic UTF8String
getInstance(TLV tlv, Tag et)
Check tag and convert - if needed - the PrimitiveTLV to a UTF8Stringjava.lang.String
toString()
Return Tag of TLV object as string-
Methods inherited from class de.cardcontact.tlv.PrimitiveTLV
dump, equals, getChildAt, getChildCount, getDate, getIndex, getLength, getParent, getValue, hashCode, isLeaf, toByteArray, valueToByteArray
-
Methods inherited from class de.cardcontact.tlv.TLV
dump, dumpSingleLine, factory, factory, factory, getBytes, getLengthFieldAsByteArray, getLengthFieldSize, getLengthFieldSizeHelper, getName, getSize, getTag, lengthFromByteArray, lengthToByteArray, setName, setTag, useAlternateLengthEncoding
-
-
-
-
Constructor Detail
-
UTF8String
public UTF8String(java.lang.String str)
Create PrintableString object- Parameters:
value
- the value part of the TLV object
-
UTF8String
public UTF8String(ParseBuffer pb) throws TLVEncodingException
Create PrintableString from binary presentation- Parameters:
pb
- Buffer with binary presentation- Throws:
TLVEncodingException
-
UTF8String
public UTF8String(TLV tlv) throws TLVEncodingException
Copy constructor to convert PrimitiveTLV to typed object Make sure, that the parent is updated with the new reference- Parameters:
tlv
- the PrimitiveTLV object- Throws:
TLVEncodingException
-
-
Method Detail
-
getInstance
public static UTF8String getInstance(TLV tlv, Tag et) throws TLVEncodingException
Check tag and convert - if needed - the PrimitiveTLV to a UTF8String- Parameters:
tlv
-et
- et tag used in implicit encoding- Returns:
- Throws:
TLVEncodingException
-
getInstance
public static UTF8String getInstance(TLV tlv) throws TLVEncodingException
Convert - if needed - the PrimitiveTLV to a UTF8String- Parameters:
tlv
-- Returns:
- Throws:
TLVEncodingException
-
toString
public java.lang.String toString()
Description copied from class:PrimitiveTLV
Return Tag of TLV object as string- Overrides:
toString
in classPrimitiveTLV
- Returns:
- String containing name of TLV object
-
-