Package de.cardcontact.tlv
Class PrintableString
- java.lang.Object
-
- de.cardcontact.tlv.TLV
-
- de.cardcontact.tlv.PrimitiveTLV
-
- de.cardcontact.tlv.PrintableString
-
- All Implemented Interfaces:
TreeNode
public class PrintableString 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 PrintableString(ParseBuffer pb)
Create PrintableString from binary presentationPrintableString(TLV tlv)
Copy constructor to convert PrimitiveTLV to typed object Make sure, that the parent is updated with the new referencePrintableString(java.lang.String str)
Create PrintableString object
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PrintableString
getInstance(TLV tlv)
Convert - if needed - the PrimitiveTLV to a PrintableStringstatic PrintableString
getInstance(TLV tlv, Tag et)
Check tag and convert - if needed - the PrimitiveTLV to a PrintableStringjava.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
-
PrintableString
public PrintableString(java.lang.String str)
Create PrintableString object- Parameters:
value
- the value part of the TLV object
-
PrintableString
public PrintableString(ParseBuffer pb) throws TLVEncodingException
Create PrintableString from binary presentation- Parameters:
pb
- Buffer with binary presentation- Throws:
TLVEncodingException
-
PrintableString
public PrintableString(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 PrintableString getInstance(TLV tlv, Tag et) throws TLVEncodingException
Check tag and convert - if needed - the PrimitiveTLV to a PrintableString- Parameters:
tlv
-et
- et tag used in implicit encoding- Throws:
TLVEncodingException
-
getInstance
public static PrintableString getInstance(TLV tlv) throws TLVEncodingException
Convert - if needed - the PrimitiveTLV to a PrintableString- Parameters:
tlv
-- 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
-
-