|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.javacard.apduio.ServerT1Protocol
public class ServerT1Protocol
The ServerT1Protocol class maintains the context used in the server side T=1 protocol.
Field Summary | |
---|---|
protected T1Block |
blockIncoming
|
protected T1Block |
blockOutgoing
|
protected boolean |
lastBlockFlag
|
protected int |
nextBlockDataOffset
|
protected T1Block |
nextIBlock
|
protected boolean |
numSeq
|
protected boolean |
numSeqRcv
|
protected boolean |
numSeqTx
|
Constructor Summary | |
---|---|
ServerT1Protocol(java.io.InputStream in,
java.io.OutputStream out)
Constructs a ServerT1Protocol 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. |
boolean |
t1Abort()
This method initiates a T=1 abort sequence to indicate the terminal not to send any more incoming data, and be ready for outgoing data. |
short |
t1GetIFSC()
This method returns the T=1 maximum supported card Information Field block size (IFSC). |
short |
t1GetIFSD()
This method returns the T=1 maximum supported device Information Field block size (IFSD). |
byte |
t1GetNAD()
This method returns the T=1 NAD byte for the last block received. |
boolean |
t1LastBlockReceived()
This method returns true if the last T=1 block in a chain has been received (i.e. |
short |
t1RcvBlock(byte[] bufferINF,
short[] LEN,
short offset,
short buffSize)
This method receives a T=1 block of data - if none are pending - or copies the data of an already- received block into the APDU buffer at the offset specified. |
short |
t1SndBlockRcvAck(byte[] buffer,
int dataOffset,
int dataLength,
boolean isLastBlock)
This method sends a T=1 block data in the APDU buffer specified bythe offset and length passed, and waits for acknowledgement transmission, without copying any data that might come along on that transmission. |
boolean |
t1Wait()
This method initiates a T=1 wait sequence to indicate the terminal that more time is required to process input, and thus avoid a timeout. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean numSeq
protected boolean numSeqTx
protected boolean numSeqRcv
protected T1Block nextIBlock
protected int nextBlockDataOffset
protected T1Block blockOutgoing
protected T1Block blockIncoming
protected boolean lastBlockFlag
Constructor Detail |
---|
public ServerT1Protocol(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 short t1SndBlockRcvAck(byte[] buffer, int dataOffset, int dataLength, boolean isLastBlock) throws T1Exception
T1Exception
public short t1RcvBlock(byte[] bufferINF, short[] LEN, short offset, short buffSize) throws T1Exception
T1Exception
public boolean t1Abort() throws T1Exception
T1Exception
public boolean t1Wait() throws T1Exception
T1Exception
public byte t1GetNAD()
public short t1GetIFSC()
public short t1GetIFSD()
public boolean t1LastBlockReceived()
public void sendATR(byte[] atr) throws java.io.IOException, T1Exception
atr
- The byte array which contains the ATR to send.
java.io.IOException
- If an IO error occured while attempting to send the ATR.
T1Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |