For the header bytes cla, ins, p1, and p2 the Java type `int` is used while for the header an APDU an unsigned octet is used. Constructors will take only the least significant byte 8 `int` value.
public interface ICommandApdu
A command application protocol data unit (A-PDU) according to ISO7816-4. The structure follows those described in ISO7816-4 with the exception of command length element. Command length (Nc) and corresponding encoded value (lc) is derived from command data element and pasted into command’s byte array.
For the header bytes cla, ins, p1, and p2 the Java type `int` is used while for the header an APDU an unsigned octet is used. Constructors will take only the least significant byte 8 `int` value.
Instances of this class are immutable. Where data is passed in or out via byte arrays, defensive cloning is performed.
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBytes()
returns a copy of the APDU octet string representation
|
int |
getCla()
Returns the value of class byte CLA of this command APDU
|
byte[] |
getData()
Returns a copy of the data bytes in the command body.
|
int |
getIns()
Returns the value of instruction byte INS of this command APDU
|
int |
getNc()
Returns the number of data bytes in command APDU or 0 if there aren’t any data in it.
|
java.lang.Integer |
getNe()
Returns the number of expected data in response APDU.
|
int |
getP1()
Returns the value of parameter byte P1 of this command APDU
|
int |
getP2()
Returns the value of parameter byte P2 of this command APDU
|
int getCla()
Returns the value of class byte CLA of this command APDU
int getIns()
Returns the value of instruction byte INS of this command APDU
int getP1()
Returns the value of parameter byte P1 of this command APDU
int getP2()
Returns the value of parameter byte P2 of this command APDU
int getNc()
Returns the number of data bytes in command APDU or 0 if there aren’t any data in it.
byte[] getData()
Returns a copy of the data bytes in the command body. If this APDU as no body, this method returns a byte array with length zero.
java.lang.Integer getNe()
Returns the number of expected data in response APDU. This number is sent within this command APDU.
If any number of available data is expected, the value is either AbstractApdu.EXPECTED_LENGTH_WILDCARD_SHORT or
AbstractApdu.EXPECTED_LENGTH_WILDCARD_EXTENDED
If value is set 0, number of expected data is either AbstractApdu.EXPECTED_LENGTH_WILDCARD_SHORT or
AbstractApdu.EXPECTED_LENGTH_WILDCARD_EXTENDED is depending on the length of data according to ISO 7816-3.
If there is no data expected in response APDU, e.g. for case 1 or 3 APDU, this value is set to null.
byte[] getBytes()
returns a copy of the APDU octet string representation