|
|||||||||
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.ResponseAPDU
public class ResponseAPDU
A ResponseAPDU represents a Response Application Protocol Data Unit received from the smart card in response to a previous CommandAPDU. A response APDU consists of an optional body and a mandatory trailer.
Field Summary |
---|
Fields inherited from class opencard.core.terminal.APDU |
---|
apdu_buffer, apdu_length |
Constructor Summary | |
---|---|
ResponseAPDU(byte[] apdu)
Creates a new object of this type and initializes it with the given apdu buffer. |
|
ResponseAPDU(int size)
Constructs an object of this type with the given buffer size. |
Method Summary | |
---|---|
byte[] |
data()
Gets the data fields of the APDU. |
int |
sw()
Gets the value of SW1 and SW2 as a short integer. |
byte |
sw1()
Gets the value of SW1 as a byte. |
byte |
sw2()
Gets the value of SW1 as a byte. |
Methods inherited from class opencard.core.terminal.APDU |
---|
append, append, getBuffer, getByte, getBytes, getLength, setByte, setLength, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ResponseAPDU(byte[] apdu)
apdu
- the byte array to be used for holding the APDU
OpencardRuntimeException
- thrown when apdu is invalidAPDU.getLength()
public ResponseAPDU(int size)
size
- the size of the buffer to create
OpencardRuntimeException
- thrown when apdu is invalidAPDU.getLength()
Method Detail |
---|
public byte[] data()
public final int sw()
public final byte sw1()
public final byte sw2()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |