Package javacardx.framework.tlv
Class ConstructedBERTag
- java.lang.Object
-
- javacardx.framework.tlv.BERTag
-
- javacardx.framework.tlv.ConstructedBERTag
-
public final class ConstructedBERTag extends BERTag
TheConstructedBERTag
class encapsulates a constructed BER TLV tag. The rules on the allowed encoding of the Tag field is based on the ASN.1 BER encoding rules of ISO/IEC 8825-1:2002.The
BERTag
class and the subclassesConstructedBERTag
andPrimitiveBERTag
, also provide static methods to parse or edit a BER Tag structure representation in a byte array.- Since:
- 2.2.2
-
-
Field Summary
-
Fields inherited from class javacardx.framework.tlv.BERTag
BER_TAG_CLASS_MASK_APPLICATION, BER_TAG_CLASS_MASK_CONTEXT_SPECIFIC, BER_TAG_CLASS_MASK_PRIVATE, BER_TAG_CLASS_MASK_UNIVERSAL, BER_TAG_TYPE_CONSTRUCTED, BER_TAG_TYPE_PRIMITIVE
-
-
Constructor Summary
Constructors Constructor Description ConstructedBERTag()
Constructor creates an empty constructed BERTLV Tag object capable of encapsulating a constructed BER TLV Tag.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
init(byte[] bArray, short bOff)
(Re-)Initializethis
ConstructedBERTag
object from the binary representation in the byte array.void
init(byte tagClass, short tagNumber)
(Re-)Initializethis
ConstructedBERTag
object with the specified tag class, and tag number.-
Methods inherited from class javacardx.framework.tlv.BERTag
equals, equals, getInstance, isConstructed, isConstructed, size, size, tagClass, tagClass, tagNumber, tagNumber, toBytes, toBytes, verifyFormat
-
-
-
-
Method Detail
-
init
public void init(byte tagClass, short tagNumber) throws TLVException
(Re-)Initializethis
ConstructedBERTag
object with the specified tag class, and tag number. All implementations must support tag numbers up to 0x3FFF.- Parameters:
tagClass
- encodes the tag class. Valid codes listed in BER_TAG_CLASS_.. constants.tagNumber
- is the tag number.- Throws:
TLVException
- with the following reason codes:TLVException.ILLEGAL_SIZE
if the tag number requested is larger than the supported maximum sizeTLVException.INVALID_PARAM
if tag class parameter is invalid or if the tag number parameter is negative.
- See Also:
BERTag
-
init
public void init(byte[] bArray, short bOff) throws TLVException
(Re-)Initializethis
ConstructedBERTag
object from the binary representation in the byte array. All implementations must support tag numbers up to 0x3FFF.- Specified by:
init
in classBERTag
- Parameters:
bArray
- the byte array containing the binary representationbOff
- the offset within bArray where the tag binary begins- Throws:
ArrayIndexOutOfBoundsException
- if accessing the input array would cause access of data outside array bounds, or if the array offset parameter is negativeNullPointerException
- ifbArray
isnull
TLVException
- with the following reason codes:TLVException.ILLEGAL_SIZE
if the tag number requested is larger than the supported maximum sizeTLVException.MALFORMED_TAG
if tag representation in the byte array is malformed or is a primitive array tag
-
-