public final class ResponseAPDU
extends java.lang.Object
Instances of this class are immutable. Where data is passed in or out via byte arrays, defensive cloning is performed.
| Constructor and Description |
|---|
ResponseAPDU(byte[] apdu)
Constructs a new instance of this class from a given byte array
containing the complete APDU contents.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBytes()
Returns a copy of the bytes in this APDU.
|
byte[] |
getData()
Returns a copy of the data bytes in the response body.
|
int |
getSW()
Returns the value of the status bytes SW1 and SW2 as a single status word
SW.
|
int |
getSW1()
Returns the value of the status byte SW1 as a value between 0 and 255.
|
int |
getSW2()
Returns the value of the status byte SW2 as a value between 0 and 255.
|
java.lang.String |
toString()
Returns the string representation of object.
|
public ResponseAPDU(byte[] apdu)
If apdu is null, a
NullPointerException is thrown.
apdu - the complete response APDU.public byte[] getData()
public int getSW1()
public int getSW2()
public int getSW()
(getSW1() << 8) | getSW2().public byte[] getBytes()
public java.lang.String toString()
toString in class java.lang.Object