|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--javacard.framework.AID
This class encapsulates the Application Identifier(AID) associated with an applet. An AID is defined in ISO 7816-5 to be a sequence of bytes between 5 and 16 bytes in length.
The JCRE creates instances of AID class to identify and manage every applet on
the card. Applets need not create instances of this class.
An applet may request and use the JCRE
owned instances to identify itself and other applet instances.
JCRE owned instances of AID are permanent JCRE Entry Point Objects
and can be accessed from any applet context. References to these permanent objects
can be stored and re-used.
An applet instance can obtain a reference to JCRE owned instances of its own AID
object by using the JCSystem.getAID() method and another applet's AID object
via the JCSystem.lookupAID() method.
An applet uses AID instances to request to share another applet's
object or to control access to its own shared object from another applet.
See Java Card Runtime Environment (JCRE) 2.1 Specification for details.
JCSystem,
SystemException| Constructor Summary | |
AID(byte[] bArray,
short offset,
byte length)
The JCRE uses this constructor to create a new AID instance
encapsulating the specified AID bytes. |
|
| Method Summary | |
boolean |
equals(byte[] bArray,
short offset,
byte length)
Checks if the specified AID bytes in bArray are the same as those encapsulated
in this AID object. |
boolean |
equals(java.lang.Object anObject)
Compares the AID bytes in this AID instance to the AID bytes in the
specified object. |
short |
getAIDbytes(byte[] buffer,
short offset,
short bOffset,
byte length)
|
byte |
getByte(byte index)
|
byte |
getBytes(byte[] dest,
short offset)
Called to get the AID bytes encapsulated within AID object. |
short |
getRID(byte[] buffer,
short bOffset)
Copy the RID part of the AID into the given buffer |
boolean |
partialEquals(byte[] bArray,
short offset,
byte length)
Checks if the specified partial AID byte sequence matches the first length bytes
of the encapsulated AID bytes within this AID object. |
boolean |
RIDEquals(AID otherAID)
Checks if the RID (National Registered Application provider identifier) portion of the encapsulated AID bytes within the otherAID object matches
that of this AID object. |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
public AID(byte[] bArray,
short offset,
byte length)
AID instance
encapsulating the specified AID bytes.bArray - the byte array containing the AID bytes.offset - the start of AID bytes in bArray.length - the length of the AID bytes in bArray.SystemException.ILLEGAL_VALUE if the length parameter is
less than 5 or greater than 16.
| Method Detail |
public final byte getBytes(byte[] dest,
short offset)
AID object.dest - byte array to copy the AID bytes.offset - within dest where the AID bytes begin.public final boolean equals(java.lang.Object anObject)
this AID instance to the AID bytes in the
specified object.
The result is true if and only if the argument is not null
and is an AID object that encapsulates the same AID bytes as this
object.
This method does not throw NullPointerException.
anObject - the object to compare this AID against.true if the AID byte values are equal, false otherwise.
public final boolean equals(byte[] bArray,
short offset,
byte length)
bArray are the same as those encapsulated
in this AID object.
The result is true if and only if the bArray argument is not null
and the AID bytes encapsulated in this AID object are equal to
the specified AID bytes in bArray.
This method does not throw NullPointerException.
bArray - containing the AID bytesoffset - within bArray to beginlength - of AID bytes in bArraytrue if equal, false otherwise.
public final boolean partialEquals(byte[] bArray,
short offset,
byte length)
length bytes
of the encapsulated AID bytes within this AID object.
The result is true if and only if the bArray argument is not null
and the input length is less than or equal to the length of the encapsulated AID
bytes within this AID object and the specified bytes match.
This method does not throw NullPointerException.
bArray - containing the partial AID byte sequenceoffset - within bArray to beginlength - of partial AID bytes in bArraytrue if equal, false otherwise.public final boolean RIDEquals(AID otherAID)
otherAID object matches
that of this AID object.
The first 5 bytes of an AID byte sequence is the RID. See ISO 7816-5 for details.
The result is true if and only if the argument is not null
and is an AID object that encapsulates the same RID bytes as this
object.
This method does not throw NullPointerException.
otherAID - the AID to compare against.true if the RID bytes match, false otherwise.
public final short getRID(byte[] buffer,
short bOffset)
buffer - the byte array to copy the RIDbOffset - the offset into the given buffer
public final short getAIDbytes(byte[] buffer,
short offset,
short bOffset,
byte length)
public final byte getByte(byte index)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||