|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.javacard.apduio.Apdu
public class Apdu
This class represent a pair of C-APDU and R-APDU. It is used internally by several components of the Java Card development kit.
Field Summary | |
---|---|
static int |
APDU_TYPE_MASK
Mask to extract APDU type information: either ISO ecoding or not. |
static int |
CASE_1
The value which indicates this Apdu is an ISO 7816-3 Case 1 apdu |
static int |
CASE_2E
The value which indicates this Apdu is an ISO 7816-3 Case 2 Extended apdu |
static int |
CASE_2S
The value which indicates this Apdu is an ISO 7816-3 Case 2 Short apdu |
static int |
CASE_3E
The value which indicates this Apdu is an ISO 7816-3 Case 3 Extended apdu |
static int |
CASE_3S
The value which indicates this Apdu is an ISO 7816-3 Case 3 Short apdu |
static int |
CASE_4E
The value which indicates this Apdu is an ISO 7816-3 Case 4 Extended apdu |
static int |
CASE_4S
The value which indicates this Apdu is an ISO 7816-3 Case 4 Short apdu |
static int |
CLA
The offset in the command array to the ISO 7816-3 CLA octet. |
byte[] |
command
Internal representation of the C-APDU header |
byte[] |
dataIn
Data part of the C-APDU |
byte[] |
dataOut
Data part of the R-APDU |
static int |
INS
The offset in the command array to the ISO 7816-3 INS octet. |
boolean |
isExtended
Extended APDU flag |
int |
Lc
Value of Lc |
int |
Le
Value of Le |
static int |
LOGICAL_CHN_MASK
Mask to extract channel information out of the CLA byte. |
static int |
P1
The offset in the command array to the ISO 7816-3 P1 octet. |
static int |
P2
The offset in the command array to the ISO 7816-3 P2 octet. |
static int |
P3
The offset in the command array to the ISO 7816-3 P3 octet. |
byte[] |
sw1sw2
Status as byte array |
Constructor Summary | |
---|---|
Apdu()
Creates a new instance of Apdu. |
Method Summary | |
---|---|
int |
getCase()
Return the ISO 7816-3 Case of this Apdu |
byte |
getChannelInfo()
Determines the channel number |
byte[] |
getCommand()
Get internal representation of the header of the C-APDU |
byte[] |
getCommandApduBytes()
returns the command APDU as a byte array. |
byte[] |
getDataIn()
Get the data part of the C-APDU |
byte[] |
getDataOut()
Get the data part of the R-APDU |
int |
getLc()
Get Lc |
int |
getLe()
Get Le |
byte[] |
getResponseApduBytes()
returns the response APDU as a byte array. |
int |
getStatus()
Get status (SW bytes) as integer |
byte[] |
getSw1Sw2()
Get status bytes |
void |
setDataIn(byte[] dataIn)
Set the data of the C-APDU |
void |
setDataIn(byte[] dataIn,
int length)
Set the data of the C-APDU |
void |
setDataOut(byte[] dataOut)
Set the data part of the R-APDU |
void |
setDataOut(byte[] dataOut,
int length)
Set the data part of the R-APDU |
void |
setLc(int Lc)
Set the value of Lc |
void |
setLe(int Le)
Set Le |
java.lang.String |
toString()
Generate a string representation of this Apdu in the ApduTool output format. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int CLA
public static final int INS
public static final int P1
public static final int P2
public static final int P3
public static final int CASE_1
public static final int CASE_2S
public static final int CASE_3S
public static final int CASE_4S
public static final int CASE_2E
public static final int CASE_3E
public static final int CASE_4E
public static final int LOGICAL_CHN_MASK
public static final int APDU_TYPE_MASK
public byte[] command
public int Lc
public byte[] dataIn
public int Le
public byte[] dataOut
public byte[] sw1sw2
public boolean isExtended
Constructor Detail |
---|
public Apdu()
Method Detail |
---|
public byte[] getCommand()
public byte[] getDataIn()
public void setDataIn(byte[] dataIn)
dataIn
- The datapublic void setLc(int Lc)
Lc
- value of the Lcpublic void setDataIn(byte[] dataIn, int length)
dataIn
- The datalength
- the data lengthpublic int getLc()
public void setDataOut(byte[] dataOut)
dataOut
- The datapublic void setLe(int Le)
Le
- value of Lepublic void setDataOut(byte[] dataOut, int length)
dataOut
- The datalength
- The data lengthpublic int getLe()
public byte[] getDataOut()
public byte[] getSw1Sw2()
public int getStatus()
public int getCase()
public byte getChannelInfo()
public byte[] getCommandApduBytes()
public byte[] getResponseApduBytes()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |