|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.dalsemi.onewire.container.ResponseAPDU
A ResponseAPDU represents an Application Protocol Data Unit (APDU)
received from the smart card in response to a previous CommandAPDU.
A ResponseAPDU consists of an optional body and a mandatory
Status Word (SW).
According to ISO 7816-4, a ResponseAPDU has the following
format:
DATA | STATUS WORD [data] | SW1 SW2where
Constructor Summary | |
ResponseAPDU(byte[] buffer)
Constructs a new ResponseAPDU initialized with the given buffer byte array. |
Method Summary | |
byte |
getByte(int index)
Gets the byte value at the specified position in the internal buffer. |
byte[] |
getBytes()
Gets a byte array holding the internal ResponseAPDU buffer. |
byte[] |
getData()
Gets the data field of the ResponseAPDU. |
int |
getLength()
Gets the length of the internal buffer. |
int |
getSW()
Gets the value of SW1 and SW2 as an integer. |
byte |
getSW1()
Gets the value of SW1. |
byte |
getSW2()
Gets the value of SW2. |
java.lang.String |
toString()
Gets a string representation of this ResponseAPDU. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ResponseAPDU(byte[] buffer)
buffer
- the byte array with data for the internal apduBuffer.java.lang.RuntimeException
- thrown when buffer is invalid.getLength()
Method Detail |
public byte[] getData()
public final int getSW()
public final byte getSW1()
public final byte getSW2()
public final byte getByte(int index)
index
- the position in the buffergetLength()
public final byte[] getBytes()
public final int getLength()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |