public class AIDProxy extends Object
AIDAID| Constructor and Description |
|---|
AIDProxy(byte[] bArray,
short offset,
byte length)
The Java Card runtime environment uses this constructor to create a new
AID instance
encapsulating the specified AID bytes. |
| Modifier and Type | Method and Description |
|---|---|
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(Object anObject)
Compares the AID bytes in
this AID instance to the AID bytes in the
specified object. |
byte |
getBytes(byte[] dest,
short offset)
Called to get all the AID bytes encapsulated within AID object.
|
byte |
getPartialBytes(short aidOffset,
byte[] dest,
short oOffset,
byte oLength)
Called to get part of the AID bytes encapsulated within the
AID object starting
at the specified offset for the specified length. |
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(AIDProxy 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. |
public AIDProxy(byte[] bArray,
short offset,
byte length)
throws javacard.framework.SystemException,
NullPointerException,
ArrayIndexOutOfBoundsException,
SecurityException
AID instance
encapsulating the specified AID bytes.bArray - the byte array containing the AID bytesoffset - the start of AID bytes in bArraylength - the length of the AID bytes in bArrayjavacard.framework.SystemException - with the following reason code:
SystemException.ILLEGAL_VALUE if the length parameter is
less than 5 or greater than 16
NullPointerException - if the bArray parameter is nullArrayIndexOutOfBoundsException - if the offset parameter or length parameter is negative or if offset+length is greater than the length of the bArray parameterSecurityException - if the bArray array is not accessible in the caller's contextpublic final byte getBytes(byte[] dest,
short offset)
throws NullPointerException,
ArrayIndexOutOfBoundsException,
SecurityException
dest - byte array to copy the AID bytesoffset - within dest where the AID bytes beginNullPointerException - if the dest parameter is nullArrayIndexOutOfBoundsException - if the offset parameter is negative or offset+length of AID bytes is greater than the length of the dest arraySecurityException - if the dest array is not accessible in the caller's contextpublic final boolean equals(Object anObject) throws SecurityException
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.
equals in class ObjectanObject - the object to compare this AID againsttrue if the AID byte values are equal, false otherwiseSecurityException - if anObject object is not accessible in the caller's contextpublic final boolean equals(byte[] bArray,
short offset,
byte length)
throws ArrayIndexOutOfBoundsException,
SecurityException
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 otherwiseArrayIndexOutOfBoundsException - if the offset parameter or length parameter is negative or
if offset+length is greater than the length of the bArray parameterSecurityException - if the bArray array is not accessible in the caller's contextpublic final boolean partialEquals(byte[] bArray,
short offset,
byte length)
throws ArrayIndexOutOfBoundsException,
SecurityException
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 otherwiseArrayIndexOutOfBoundsException - if the offset parameter or length parameter is negative or
if offset+length is greater than the length of the bArray parameterSecurityException - if the bArray array is not accessible in the caller's contextpublic final boolean RIDEquals(AIDProxy otherAID) throws SecurityException
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 againsttrue if the RID bytes match, false otherwiseSecurityException - if the otherAID object is not accessible in the caller's contextpublic final byte getPartialBytes(short aidOffset,
byte[] dest,
short oOffset,
byte oLength)
throws NullPointerException,
ArrayIndexOutOfBoundsException,
SecurityException
AID object starting
at the specified offset for the specified length.aidOffset - offset within AID array to begin copying bytesdest - the destination byte array to copy the AID bytes intooOffset - offset within dest where the output bytes beginoLength - the length of bytes requested in dest. 0
implies a request to copy all remaining AID bytes.destNullPointerException - if the dest parameter is nullArrayIndexOutOfBoundsException - if the aidOffset parameter is
negative or greater than the length of the encapsulated AID bytes or the
oOffset parameter is negative
or oOffset+length of bytes requested is greater than the length of the
dest arraySecurityException - if the dest array is not accessible in the caller's context