Package de.cardcontact.tlv
Class OctetString
- java.lang.Object
-
- de.cardcontact.tlv.TLV
-
- de.cardcontact.tlv.PrimitiveTLV
-
- de.cardcontact.tlv.OctetString
-
- All Implemented Interfaces:
TreeNode
public class OctetString 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 OctetString(byte[] value)
Create octet stringOctetString(ParseBuffer pb)
Create octet string from binary presentationOctetString(TLV tlv)
Copy constructor to convert PrimitiveTLV to typed object Make sure, that the parent is updated with the new reference
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static OctetString
getInstance(TLV tlv)
Convert - if needed - the PrimitiveTLV to a OctetStringstatic OctetString
getInstance(TLV tlv, Tag et)
Check tag and convert - if needed - the PrimitiveTLV to a OctetString-
Methods inherited from class de.cardcontact.tlv.PrimitiveTLV
dump, equals, getChildAt, getChildCount, getDate, getIndex, getLength, getParent, getValue, hashCode, isLeaf, toByteArray, toString, 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
-
OctetString
public OctetString(byte[] value)
Create octet string- Parameters:
value
- the value part of the TLV object
-
OctetString
public OctetString(ParseBuffer pb) throws TLVEncodingException
Create octet string from binary presentation- Parameters:
pb
- Buffer with binary presentation- Throws:
TLVEncodingException
-
OctetString
public OctetString(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 OctetString getInstance(TLV tlv, Tag et) throws TLVEncodingException
Check tag and convert - if needed - the PrimitiveTLV to a OctetString- Parameters:
tlv
-et
- et tag used in implicit encoding- Throws:
TLVEncodingException
-
getInstance
public static OctetString getInstance(TLV tlv) throws TLVEncodingException
Convert - if needed - the PrimitiveTLV to a OctetString- Parameters:
tlv
-- Returns:
- Throws:
TLVEncodingException
-
-