public final class AnswerToReset
extends java.lang.Object
Instances of this class are immutable. Where data is passed in or out via byte arrays, defensive cloning is performed.
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
AnswerToReset(byte[] atr)
Constructs a new instance of this class from a given byte array.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public static final int PROTOCOL_T0
public static final int PROTOCOL_T1
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.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