Smart Card Solution
User Manual
- R502 Manual
JavaCard API Samples
- Algorithm
Java Card Specification
Knowledge Sharing
Smart Card Solution
User Manual
JavaCard API Samples
Java Card Specification
Knowledge Sharing
javacardx.framework.tlv
public final class PrimitiveBERTagextends BERTag
The PrimitiveBERTag class encapsulates a primitive 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 subclasses ConstructedBERTag and
PrimitiveBERTag, 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 | |
---|---|
PrimitiveBERTag () Constructor creates an empty PrimitiveBERTag object capable of encapsulating a primitive BER TLV Tag. |
Method Summary | |
---|---|
void | init (byte[] bArray,short bOff) (Re-)Initialize this PrimitiveBERTLV Tag object from the binary representation in the byte array. |
void | init (byte tagClass,short tagNumber) (Re-)Initialize this PrimitiveBERTag object with the specified tag class, and tag number. |
Methods inherited from class javacardx.framework.tlv.BERTag |
---|
equals , getInstance , isConstructed , isConstructed , size , size , tagClass , tagClass , tagNumber , tagNumber , toBytes , toBytes , verifyFormat |
Methods inherited from class java.lang.Object |
---|
equals |
Constructor Detail |
---|
public PrimitiveBERTag()
Constructor creates an empty PrimitiveBERTag object capable of encapsulating a primitive BER TLV Tag. All implementations must support at least 3 byte Tags which can encode tag numbers up to 0x3FFF.
Method Detail |
---|
public void init(byte tagClass, short tagNumber) throws TLVException
(Re-)Initialize this PrimitiveBERTag 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 BERTAG_CLASS_* constants.
tagNumber - is the tag number.
Throws:
TLVException - with the following reason codes:
See Also:BERTag
public void init(byte[] bArray, short bOff) throws TLVException
(Re-)Initialize this PrimitiveBERTLV Tag object from the binary representation in the byte array. All implementations must support tag numbers up to 0x3FFF.
Specified by:init in class BERTag
Parameters:bArray - the byte array containing the binary representation
bOff - the offset within bArray where the tag binary value begins
Throws: ArrayIndexOutOfBoundsException - if accessing the input array would cause access of data outside array bounds, or if the array offset parameter is negative
NullPointerException - if bArray is null
TLVException - with the following reason codes: