|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectopencard.core.terminal.APDU
opencard.core.terminal.CommandAPDU
opencard.opt.terminal.ISOCommandAPDU
public class ISOCommandAPDU
Field Summary | |
---|---|
static int |
CASE_1
Constants for the 7 cases of ISO CommandAPDUs |
static int |
CASE_2E
|
static int |
CASE_2S
|
static int |
CASE_3E
|
static int |
CASE_3S
|
static int |
CASE_4E
|
static int |
CASE_4S
|
static int |
CLASS
Constants for addressing in the APDU header array. |
static int |
INSTRUCTION
|
protected int |
lc
The length of the data field of the APDU. |
protected int |
le
The expected length of the ResponseAPDU. |
static int |
P1
|
static int |
P2
|
Fields inherited from class opencard.core.terminal.APDU |
---|
apdu_buffer, apdu_length |
Constructor Summary | |
---|---|
ISOCommandAPDU(byte classByte,
byte instruction,
byte p1,
byte p2)
Constructs a new ISO command APDU (ISO 7816-4 CASE 1). |
|
ISOCommandAPDU(byte classByte,
byte instruction,
byte p1,
byte p2,
byte[] data)
Constructs a new ISO command APDU (ISO 7816-4 CASE 3). |
|
ISOCommandAPDU(byte classByte,
byte instruction,
byte p1,
byte p2,
byte[] data,
int le)
Constructs a new ISO command APDU (ISO 7816-4 CASE 4). |
|
ISOCommandAPDU(byte classByte,
byte instruction,
byte p1,
byte p2,
int le)
Constructs a new ISO command APDU (ISO 7816-4 CASE 2). |
|
ISOCommandAPDU(int size,
byte classByte,
byte instruction,
byte p1,
byte p2)
Constructs a new ISO command APDU (ISO 7816-4 CASE 1). |
|
ISOCommandAPDU(int size,
byte classByte,
byte instruction,
byte p1,
byte p2,
byte[] data)
Constructs a new ISO command APDU (ISO 7816-4 CASE 3). |
|
ISOCommandAPDU(int size,
byte classByte,
byte instruction,
byte p1,
byte p2,
byte[] data,
int le)
Constructs a new ISO command APDU (ISO 7816-4 CASE 4). |
|
ISOCommandAPDU(int size,
byte classByte,
byte instruction,
byte p1,
byte p2,
int le)
Constructs a new ISO command APDU (ISO 7816-4 CASE 2). |
Method Summary | |
---|---|
void |
append(byte b)
Appends the given byte to the buffered APDU. |
void |
append(byte[] bytes)
Appends the given byte array to the data field of the APDU. |
byte |
getCLA()
Gets the class byte. |
byte |
getINS()
Gets the instruction byte. |
int |
getIsoCase()
Gets the CASE of this ISOCommandAPDU. |
int |
getLC()
Gets the length lc of the data. |
int |
getLE()
Gets the expected length le of the response APDU. |
byte |
getP1()
Gets the P1 byte. |
byte |
getP2()
Gets the P2 byte. |
java.lang.String |
toString()
Gets a string representation of this APDU. |
Methods inherited from class opencard.core.terminal.APDU |
---|
getBuffer, getByte, getBytes, getLength, setByte, setLength |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int lc
protected int le
public static final int CASE_1
public static final int CASE_2S
public static final int CASE_2E
public static final int CASE_3S
public static final int CASE_3E
public static final int CASE_4S
public static final int CASE_4E
public static final int CLASS
public static final int INSTRUCTION
public static final int P1
public static final int P2
Constructor Detail |
---|
public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2)
classByte
- The CLA byte as specfied in ISO 7816-4.instruction
- The INS byte.p1
- Parameter byte P1.p2
- Parameter byte P2.public ISOCommandAPDU(int size, byte classByte, byte instruction, byte p1, byte p2)
size
- the size of the APDU buffer to createclassByte
- The CLA byte as specfied in ISO 7816-4.instruction
- The INS byte.p1
- Parameter byte P1.p2
- Parameter byte P2.public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2, int le)
classByte
- The CLA byte as specfied in ISO 7816-4.instruction
- The INS byte.p1
- Parameter byte P1.p2
- Parameter byte P2.le
- An integer value giving the expected length of the response APDU.
This value can be in the range of -1 to 65536, where -1 means no
length is expected and 0 means the maximum length supported
is expected.public ISOCommandAPDU(int size, byte classByte, byte instruction, byte p1, byte p2, int le)
size
- the size of the APDU buffer to createclassByte
- The CLA byte as specfied in ISO 7816-4.instruction
- The INS byte.p1
- Parameter byte P1.p2
- Parameter byte P2.le
- An integer value giving the expected length of the response APDU.
This value can be in the range of -1 to 65536, where -1 means no
length is expected and 0 means the maximum length supported
is expected.public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2, byte[] data)
classByte
- The CLA byte as specfied in ISO 7816-4.instruction
- The INS byte.p1
- Parameter byte P1.p2
- Parameter byte P2.data
- The command APDU data as a byte array. The length lc (which is
part of the body of the APDU) is derived from the array length.public ISOCommandAPDU(int size, byte classByte, byte instruction, byte p1, byte p2, byte[] data)
size
- the size of the APDU buffer to createclassByte
- The CLA byte as specfied in ISO 7816-4.instruction
- The INS byte.p1
- Parameter byte P1.p2
- Parameter byte P2.data
- The command APDU data as a byte array. The length lc (which is
part of the body of the APDU) is derived from the array length.public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2, byte[] data, int le)
classByte
- The CLA byte as specfied in ISO 7816-4.instruction
- The INS byte.p1
- Parameter byte P1.p2
- Parameter byte P2.data
- The command APDU data as a byte array. The length lc (which is
part of the body of the APDU) is derived from the array length.le
- An integer value giving the expected length of the response APDU.
This value can be in the range of -1 to 65536, where -1 means no
length is expected and 0 means the maximum length supported
is expected.public ISOCommandAPDU(int size, byte classByte, byte instruction, byte p1, byte p2, byte[] data, int le)
size
- the size of the APDU buffer to createclassByte
- The CLA byte as specfied in ISO 7816-4.instruction
- The INS byte.p1
- Parameter byte P1.p2
- Parameter byte P2.data
- The command APDU data as a byte array. The length lc (which is
part of the body of the APDU) is derived from the array length.le
- An integer value giving the expected length of the response APDU.
This value can be in the range of -1 to 65536, where -1 means no
length is expected and 0 means the maximum length supported
is expected.Method Detail |
---|
public byte getCLA()
public byte getINS()
public byte getP1()
public byte getP2()
public int getLC()
public int getLE()
public int getIsoCase()
public void append(byte[] bytes) throws java.lang.IndexOutOfBoundsException
append
in class APDU
bytes
- the byte array to be appended
java.lang.IndexOutOfBoundsException
- The buffer size is exceeded or a le exists in buffer.public void append(byte b) throws java.lang.IndexOutOfBoundsException
append
in class APDU
b
- the byte to be appended
java.lang.IndexOutOfBoundsException
- The buffer size is exceeded or a le exists in buffer.public java.lang.String toString()
toString
in class APDU
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |