opencard.opt.terminal.protocol
Class T1BlockFactory
java.lang.Object
|
+--opencard.opt.terminal.protocol.T1BlockFactory
- public class T1BlockFactory
- extends java.lang.Object
T1BlockFactory
creates T1Block-objects - for detailed informations see ISO-7816-3.
Method Summary |
static T1Block |
createIBlock(int sourceID,
int destID,
int edcAlg,
int sendSequenceNumber,
boolean moreDataBit,
byte[] data)
createIBlock
creates I-Block according to ISO7816-3 |
static T1Block |
createRBlock(int sourceID,
int destID,
int edcAlg,
int sequenceNumber,
int errInfo)
createRBlock
creates R-Block according to ISO7816-3 |
static T1Block |
createSBlock(int sourceID,
int destID,
int edcAlg,
int statusInfo,
byte[] data)
createSBlock
creates S-Block according to ISO7816-3 |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
T1BlockFactory
public T1BlockFactory()
createIBlock
public static T1Block createIBlock(int sourceID,
int destID,
int edcAlg,
int sendSequenceNumber,
boolean moreDataBit,
byte[] data)
throws T1Exception
- createIBlock
creates I-Block according to ISO7816-3
- Parameters:
sourceID
- the sourceID of the frame for the NAD-byte (0-7)destID
- the destID of the frame for the NAD-byte (0-7)edcAlg
- the used algorithm for calculation of the EDC byte
possible values: T1Block.USE_LDR, T1Block.USE_CRCsendSequenceNumber
- the sequence number of the frame
internal used value is (sendSequenceNumber mod 2)moreDataBit
- true for chained block (not implemented), false for normal operationdata
- application data- See Also:
T1Block
createRBlock
public static T1Block createRBlock(int sourceID,
int destID,
int edcAlg,
int sequenceNumber,
int errInfo)
throws T1Exception
- createRBlock
creates R-Block according to ISO7816-3
- Parameters:
sourceID
- the sourceID of the frame for the NAD-byte (0-7)destID
- the destID of the frame for the NAD-byte (0-7)edcAlg
- the used algorithm for calculation of the EDC byte
possible values: EDC_LDR, EDC_CRCsequenceNumber
- the sequence number of the related frame
internal used value is (sequenceNumber mod 2)errInfo
- indicates the error
possible values: T1Block.ERROR_NONE, T1Block.ERROR_EDC, T1Block.ERROR_OTHER- See Also:
T1Block
createSBlock
public static T1Block createSBlock(int sourceID,
int destID,
int edcAlg,
int statusInfo,
byte[] data)
throws T1Exception
- createSBlock
creates S-Block according to ISO7816-3
- Parameters:
sourceID
- the sourceID of the frame for the NAD-byte (0-7)destID
- the destID of the frame for the NAD-byte (0-7)edcAlg
- the used algorithm for calculation of the EDC byte
possible values: EDC_LDR, EDC_CRCstatusInfo
- indicates the error
possible values:
T1Block.S_RESYNCH_REQUEST, T1Block.S_RESYNCH_RESPONSE,
T1Block.S_IFS_REQUEST, T1Block.S_IFS_RESPONSE,
T1Block.S_ABORT_REQUEST, T1Block.S_ABORT_RESPONSE,
T1Block.S_WTX_REQUEST, T1Block.S_WTX_RESPONSE,
T1Block.S_VPP_STATE_ERROR_RESPONSEdata
- application data- See Also:
T1Block