|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectopencard.core.terminal.CardID
public class CardID
Represents a smartcard's ATR (Answer To Reset). In addition to the ATR itself, the Slot where the card is inserted can be stored. The ATR is used for identifying cards. It usually contains some so-called historical characters which can be used to determine the type of card. Since the historical characters can be defined by the card issuer, they may also give a hint on the applications supported by the smartcard.
Field Summary | |
---|---|
protected byte[] |
atr
The represented ATR. |
protected java.lang.String |
cachedResult
The cached result of toString. |
protected byte[] |
historicals
The historical characters of the ATR. |
protected int |
slotNr
The slot which holds the card with this ATR. |
protected CardTerminal |
terminal
|
Constructor Summary | |
---|---|
CardID(byte[] answerToResetResponse)
Instantiates a new card ID representing the given ATR. |
|
CardID(CardTerminal terminal,
int slotID,
byte[] answerToResetResponse)
Instantiates a new card ID representing the given ATR from the given slot. |
|
CardID(Slot slot,
byte[] answerToResetResponse)
Deprecated. use CardID(CardTerminal, int, byte[]) |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Compares this with another CardID object. |
byte[] |
getATR()
Gets the represented ATR. |
CardTerminal |
getCardTerminal()
Deprecated. use getSlotID() instead |
byte[] |
getHistoricals()
Gets the historical characters. |
Slot |
getSlot()
Deprecated. use getSlotID(), getCardTerminal() instead |
int |
getSlotID()
Deprecated. use getSlotID() instead |
java.lang.String |
toString()
Returns a String representation of this CardID object. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected byte[] atr
protected byte[] historicals
protected int slotNr
protected CardTerminal terminal
protected java.lang.String cachedResult
toString()
Constructor Detail |
---|
public CardID(byte[] answerToResetResponse) throws CardTerminalException
answerToResetResponse
- a byte array holding the ATR to represent
CardTerminalException
- if the ATR is invalidpublic CardID(Slot slot, byte[] answerToResetResponse) throws CardTerminalException
CardTerminalException
public CardID(CardTerminal terminal, int slotID, byte[] answerToResetResponse) throws CardTerminalException
terminal
- the terminal where the card with this ATR is insertedslotID
- the slot where the card with this ATR is inserted.answerToResetResponse
- a byte array holding the ATR
CardTerminalException
- if the ATR is invalidMethod Detail |
---|
public byte[] getATR()
public byte[] getHistoricals()
public Slot getSlot()
public int getSlotID()
public CardTerminal getCardTerminal()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the CardID to compare with
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |