com.ibutton.jib
Class CommandAPDU
java.lang.Object
|
+--com.ibutton.jib.CommandAPDU
- public class CommandAPDU
- extends java.lang.Object
A class that represents a command APDU to be sent to the Java
Powered iButton. Refer to ISO 7816 for details of Command APDUs.
|
Constructor Summary |
CommandAPDU(byte cla,
byte ins,
byte p1,
byte p2)
Constructs a new CommandAPDU with the given APDU parameters. |
CommandAPDU(byte cla,
byte ins,
byte p1,
byte p2,
byte[] data)
Constructs a new CommandAPDU with the given APDU parameters. |
|
Method Summary |
void |
appendData(byte[] data)
Appends the given data to this APDU. |
byte[] |
getAPDUBytes()
Gets a byte array representing this APDU. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
CommandAPDU
public CommandAPDU(byte cla,
byte ins,
byte p1,
byte p2)
- Constructs a new CommandAPDU with the given APDU parameters.
- Parameters:
cla - the CLA of the APDU.ins - the INS of the APDU.p1 - the P1 of the APDU.p2 - the P2 of the APDU.
CommandAPDU
public CommandAPDU(byte cla,
byte ins,
byte p1,
byte p2,
byte[] data)
- Constructs a new CommandAPDU with the given APDU parameters.
- Parameters:
cla - the CLA of the APDU.ins - the INS of the APDU.p1 - the P1 of the APDU.p2 - the P2 of the APDU.data - the body(data) of the APDU.
appendData
public void appendData(byte[] data)
- Appends the given data to this APDU.
- Parameters:
data - a byte array of data to be appended.
getAPDUBytes
public byte[] getAPDUBytes()
- Gets a byte array representing this APDU.
- Returns:
- an array representation of the APDU.