public final class ApduRequest
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
ApduRequest(byte[] bytes,
boolean case4)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getBytes()
Gets the APDU bytes to send to the card.
|
java.lang.String |
getName()
Gets the name of this APDU request if it has been defined (see setName).
|
java.util.Set<java.lang.Integer> |
getSuccessfulStatusCodes()
Get the list of valid status codes for the request.
|
boolean |
isCase4()
Indicates if the APDU is type 4.
|
ApduRequest |
setName(java.lang.String name)
Name this APDU request.
|
ApduRequest |
setSuccessfulStatusCodes(java.util.Set<java.lang.Integer> successfulStatusCodes)
The successfulStatusCodes list indicates which status words in the response should be
considered successful even though they are different from 9000h.
|
java.lang.String |
toString() |
public ApduRequest(byte[] bytes, boolean case4)
bytes
contains the APDU command bytes to send to the card.
The case4
boolean is set to true to indicate that APDU has incoming and outgoing
data. It helps to handle cards that present a behaviour not compliant with ISO 7816-3 in
contacts mode (not returning the 61XYh status).
bytes
- A not empty byte array.case4
- True if the APDU is in case 4, false if not.public ApduRequest setSuccessfulStatusCodes(java.util.Set<java.lang.Integer> successfulStatusCodes)
successfulStatusCodes
- A not empty Set of Integer.public boolean isCase4()
public ApduRequest setName(java.lang.String name)
This name String is dedicated to improving the readability of logs and should therefore only be called conditionally (e.g. level >= debug).
name
- A not null String.public java.util.Set<java.lang.Integer> getSuccessfulStatusCodes()
public java.lang.String getName()
public byte[] getBytes()
public java.lang.String toString()
toString
in class java.lang.Object