|
PCSC4Java
0.2
Library PCSC for Java language.
|
Public Member Functions | |
| ResponseAPDU (byte[] apdu) | |
| int | getNr () |
| byte[] | getData () |
| int | getSW1 () |
| int | getSW2 () |
| int | getSW () |
| byte[] | getBytes () |
| String | toString () |
| boolean | equals (Object obj) |
| int | hashCode () |
A response APDU as defined in ISO/IEC 7816-4. It consists of a conditional body and a two byte trailer. This class does not attempt to verify that the APDU encodes a semantically valid response.
Instances of this class are immutable. Where data is passed in or out via byte arrays, defensive cloning is performed.
Definition at line 46 of file ResponseAPDU.java.
| fr.redbilled.pcscforjava.ResponseAPDU.ResponseAPDU | ( | byte[] | apdu | ) |
Constructs a ResponseAPDU from a byte array containing the complete APDU contents (conditional body and trailed).
Note that the byte array is cloned to protect against subsequent modification.
| apdu | the complete response APDU |
| NullPointerException | if apdu is null |
| IllegalArgumentException | if apdu.length is less than 2 |
Definition at line 65 of file ResponseAPDU.java.

| boolean fr.redbilled.pcscforjava.ResponseAPDU.equals | ( | Object | obj | ) |
Compares the specified object with this response APDU for equality. Returns true if the given object is also a ResponseAPDU and its bytes are identical to the bytes in this ResponseAPDU.
| obj | the object to be compared for equality with this response APDU |
Definition at line 159 of file ResponseAPDU.java.


| byte [] fr.redbilled.pcscforjava.ResponseAPDU.getBytes | ( | ) |
Returns a copy of the bytes in this APDU.
Definition at line 137 of file ResponseAPDU.java.
| byte [] fr.redbilled.pcscforjava.ResponseAPDU.getData | ( | ) |
Returns a copy of the data bytes in the response body. If this APDU as no body, this method returns a byte array with a length of zero.
Definition at line 96 of file ResponseAPDU.java.
Returns the number of data bytes in the response body (Nr) or 0 if this APDU has no body. This call is equivalent to getData().length.
Definition at line 85 of file ResponseAPDU.java.
Returns the value of the status bytes SW1 and SW2 as a single status word SW. It is defined as (getSW1() << 8) | getSW2().
Definition at line 128 of file ResponseAPDU.java.


Returns the value of the status byte SW1 as a value between 0 and 255.
Definition at line 107 of file ResponseAPDU.java.

Returns the value of the status byte SW2 as a value between 0 and 255.
Definition at line 116 of file ResponseAPDU.java.

Returns the hash code value for this response APDU.
Definition at line 175 of file ResponseAPDU.java.
Returns a string representation of this response APDU.
Definition at line 146 of file ResponseAPDU.java.
