Instances of this class are immutable. Where data is passed in or out via byte arrays, defensive cloning is performed.
CommandAPDU, CardChannel.transmit
| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | ResponseAPDU(byte[]
the complete response APDU apdu)Constructs a ResponseAPDU from a byte array containing the complete APDU contents (conditional body and trailed). |
| Modifier and Type | Method and Description |
|---|---|
| private static void | |
| public boolean | Returns: true if the specified object is equal to this response APDUthe object to be compared for equality with this response APDU obj)Overrides java. Compares the specified object with this response APDU for equality. |
| public byte[] | |
| public byte[] | Returns: a copy of the data bytes in the response body or the empty byte array if this APDU has no body.Returns a copy of the data bytes in the response body. |
| public int | Returns: the number of data bytes in the response body or 0 if this APDU has no body.Returns the number of data bytes in the response body (Nr) or 0 if this APDU has no body. |
| public int | Returns: the value of the status word SW.Returns the value of the status bytes SW1 and SW2 as a single status word SW. |
| public int | Returns: the value of the status byte SW1 as a value between 0 and 255.Returns the value of the status byte SW1 as a value between 0 and 255. |
| public int | Returns: the value of the status byte SW2 as a value between 0 and 255.Returns the value of the status byte SW2 as a value between 0 and 255. |
| public int | Returns: the hash code value for this response APDU.Overrides java. Returns the hash code value for this response APDU. |
| private void | |
| public String | Returns: a String representation of this response APDU.Overrides java. Returns a string representation of this response APDU. |
| apdu | back to summary |
|---|---|
| private byte[] apdu | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| ResponseAPDU | back to summary |
|---|---|
| public 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.
| |
| check | back to summary |
|---|---|
| private static void check(byte[] apdu) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. 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.
| |
| getBytes | back to summary |
|---|---|
| public byte[] getBytes() Returns a copy of the bytes in this APDU.
| |
| getData | back to summary |
|---|---|
| public byte[] getData() Returns a copy of the data bytes in the response body. If this APDU has no body, this method returns a byte array with a length of zero.
| |
| getNr | back to summary |
|---|---|
| public int getNr() Returns the number of data bytes in the response body (Nr) or 0 if this
APDU has no body. This call is equivalent to
| |
| getSW | back to summary |
|---|---|
| public int getSW() Returns the value of the status bytes SW1 and SW2 as a single
status word SW.
It is defined as
| |
| getSW1 | back to summary |
|---|---|
| public int getSW1() Returns the value of the status byte SW1 as a value between 0 and 255.
| |
| getSW2 | back to summary |
|---|---|
| public int getSW2() Returns the value of the status byte SW2 as a value between 0 and 255.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns the hash code value for this response APDU.
| |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string representation of this response APDU.
| |