| java.lang.Object com.sun.satsa.util.Connection
Connection | public class Connection (Code) | | Represents APDU connection to the WIM application.
|
Field Summary | |
public int | lastSW The last response APDU status word. |
Constructor Summary | |
public | Connection(Handle h) Constructs new connection object. |
Method Summary | |
public void | done() Safely closes the connection. | public byte[] | getATR() This method returns the ATR received from the card that this
Handle object is used to communicate with.
ATR information received from the card at startup orreset. | public byte[] | getFCI() This method returns the FCI received from the card that this
Handle object is used to communicate with.
FCI information received from the card at startup orreset. | public Connection | putByte(int data) Places one byte into command buffer. | public Connection | putBytes(byte[] data, int off, int length) Places the byte sequence into the buffer. | public Connection | putShort(int data) Places short value into the buffer. | public Connection | resetCommand() Resets command buffer. | public byte[] | sendCommand(int INS, int P1P2) Sends the command. | public byte[] | sendCommand(int INS, int P1P2, int LE, boolean check) Sends the command. | public void | setCLAbyte(byte cla) | public void | setUnitSize(int unitSize) |
lastSW | public int lastSW(Code) | | The last response APDU status word.
|
Connection | public Connection(Handle h)(Code) | | Constructs new connection object.
Parameters: h - APDU connection handle. |
done | public void done()(Code) | | Safely closes the connection.
|
getATR | public byte[] getATR()(Code) | | This method returns the ATR received from the card that this
Handle object is used to communicate with.
ATR information received from the card at startup orreset. In case of I/O troubles returns null. |
getFCI | public byte[] getFCI()(Code) | | This method returns the FCI received from the card that this
Handle object is used to communicate with.
FCI information received from the card at startup orreset. In case of I/O troubles returns null. |
putByte | public Connection putByte(int data)(Code) | | Places one byte into command buffer.
Parameters: data - byte to be placed this connection object |
putBytes | public Connection putBytes(byte[] data, int off, int length)(Code) | | Places the byte sequence into the buffer.
Parameters: data - data to be placed Parameters: off - data offset Parameters: length - data length this connection object |
putShort | public Connection putShort(int data)(Code) | | Places short value into the buffer.
Parameters: data - value to be placed this connection object |
resetCommand | public Connection resetCommand()(Code) | | Resets command buffer.
this connection object |
sendCommand | public byte[] sendCommand(int INS, int P1P2) throws IOException(Code) | | Sends the command.
Parameters: INS - INS byte for this command. Parameters: P1P2 - APDU parameters value response APDU throws: IOException - if IO error occurs |
sendCommand | public byte[] sendCommand(int INS, int P1P2, int LE, boolean check) throws IOException(Code) | | Sends the command.
Parameters: INS - INS byte for this command. Parameters: P1P2 - P1 and P2 values for this command Parameters: LE - response expected length Parameters: check - if true, verify that SW is 0x9000 response APDU throws: IOException - if IO error occurs |
setCLAbyte | public void setCLAbyte(byte cla)(Code) | | This method sets value for the CLAbyte variable
Parameters: cla - byte Required value. |
setUnitSize | public void setUnitSize(int unitSize)(Code) | | This method sets value for the unitSize variable
Parameters: unitSize - int Required value. |
|
|