|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.datecs.api.smartcard.AnswerToReset
public final class AnswerToReset
This class represents the smart card response ATR as defined in ISO/IEC 7816-4.
Instances of this class are immutable. Where data is passed in or out via byte arrays, defensive cloning is performed.
| Field Summary | |
|---|---|
static int |
PROTOCOL_T0
ISO/IEC 7816-4 transport protocol type T=0. |
static int |
PROTOCOL_T1
ISO/IEC 7816-4 transport protocol type T=1. |
| Constructor Summary | |
|---|---|
AnswerToReset(byte[] atr)
Constructs a new instance of this class from a given byte array. |
|
| Method Summary | |
|---|---|
byte[] |
getBytes()
Returns a copy of the bytes in this ATR. |
byte[] |
getData()
Returns a copy of the data bytes in the response body. |
int |
getProtocol()
Returns a smart card communication protocol. |
java.lang.String |
toString()
Returns the string representation of object. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int PROTOCOL_T0
public static final int PROTOCOL_T1
| Constructor Detail |
|---|
public AnswerToReset(byte[] atr)
If atr is null, a
NullPointerException is thrown.
if atr.length < 1, a IllegalArgumentException
is thrown.
atr - the byte array containing the answer-to-reset bytes.| Method Detail |
|---|
public int getProtocol()
The protocols are defined like PROTOCOL_* constant field
values.
public byte[] getData()
public byte[] getBytes()
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 | |||||||||