|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.javacard.apduio.ServerT0Protocol
public class ServerT0Protocol
The ServerT0Protocol class maintains the context used in the server side T=0 protocol.
T0ServerState| Constructor Summary | |
|---|---|
ServerT0Protocol(java.io.InputStream in,
java.io.OutputStream out)
Constructs a ServerT0Protocol using an InputStream and an OutputStream. |
|
| Method Summary | |
|---|---|
void |
addCadServerListener(CadServerListener listener)
Register a new CadServerListener to be notified of state changes. |
void |
removeCadServerListener(CadServerListener listener)
Remove a CadServerListener from the list of listeners to be notified of state changes. |
void |
sendATR(byte[] atr)
Wait for a POWER_UP command to be received from the CAD and send the ATR (Answer To Reset) back to the CAD. |
byte |
t0RcvCommand(byte[] command)
Receive a five byte T=0 command APDU into the command array. |
byte |
t0RcvData(byte[] buffer,
short offset,
short count,
byte procByte)
Receive the data portion of a T=0 APDU. |
byte |
t0SndData(byte[] buffer,
short offset,
short count)
Send the data portion of a T=0 APDU. |
byte |
t0SndData(byte[] buffer,
short offset,
short count,
byte procByte)
Send the data portion of a T=0 APDU. |
byte |
t0SndStatusRcvCommand(byte[] command,
short sw1sw2)
Send the status bytes SW1/SW2 and receive a five byte T=0 header into the command array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServerT0Protocol(java.io.InputStream in,
java.io.OutputStream out)
in - The InputStream connected to the CAD.out - The OutputStream connected to the CAD.| Method Detail |
|---|
public void addCadServerListener(CadServerListener listener)
listener - The listener to register.public void removeCadServerListener(CadServerListener listener)
listener - The listener to remove.public byte t0RcvCommand(byte[] command)
command - The byte array to receive data into. The array must be at
least five bytes long.
public byte t0SndStatusRcvCommand(byte[] command,
short sw1sw2)
command - The byte array to receive data into. The array must be at
least five bytes long.sw1sw2 - the status bytes SW1 and SW2 are combined into the short
sw1sw2
public byte t0RcvData(byte[] buffer,
short offset,
short count,
byte procByte)
buffer - The buffer into which the data is read.offset - The index in buffer in which to start storing the bytes read.count - The number of bytes to read.procByte - The procedure byte to send.
public byte t0SndData(byte[] buffer,
short offset,
short count,
byte procByte)
buffer - The buffer from which the data is sent.offset - The index in buffer in which to start sending from.count - The number of bytes to send.procByte - The procedure byte to send.
public byte t0SndData(byte[] buffer,
short offset,
short count)
buffer - The buffer from which the data is sent.offset - The index in buffer in which to start sending from.count - The number of bytes to send.
public void sendATR(byte[] atr)
throws java.io.IOException,
TLP224Exception
atr - The byte array which contains the ATR to send.
java.io.IOException - If an IO error occured while attempting to send the ATR.
TLP224Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||