|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.linuxnet.jpcsc.Card
The Card class offers PCSC functions related to connecting, disconnecting and transferring data to cards.
Method Summary | |
void |
BeginTransaction()
Signal the start of a transaction. |
byte[] |
Control(int dwControlCode,
byte[] in)
Wrapper for SCardControl(). |
byte[] |
Control(int dwControlCode,
byte[] in,
int off,
int len)
Wrapper for SCardControl(). |
void |
Disconnect()
Default disconnect from card (LEAVE_CARD). |
void |
Disconnect(int param)
Disconnect from card. |
void |
EndTransaction(int disposition)
Signal end of a transaction. |
protected void |
finalize()
Finalizer. |
byte[] |
GetAttrib(int dwAttribId)
Get an attribute from the IFD Handler. |
int |
getProto()
Return protocol used. |
boolean |
getResendOnWrongLe()
Return flag indicating the transparent handling of resend on wrong Le |
boolean |
getT0GetResponse()
Return flag indicating the transparent handling of T0 GetResponse. |
void |
Reconnect(int dwSharedMode,
int dwPreferredProtos,
int dwInitialization)
Reconnect to card. |
void |
SetAttrib(int dwAttribId,
byte[] attr)
Set an attribute of the IFD Handler. |
void |
setResendOnWrongLe(boolean b)
Switch on/off transparent handling of resend on wrong Le |
void |
setT0GetResponse(boolean b)
Switch on/off transparent handling of T0 GetResponse. |
State |
Status()
Return status of connection. |
void |
Status(State state)
Return status of connection in the specified state object. |
java.lang.String |
toString()
Return string representation. |
byte[] |
Transmit(Apdu apdu)
Transmit given APDU. |
byte[] |
Transmit(byte[] in,
int off,
int len)
Transmit data. |
int |
Transmit(byte[] in,
int inoff,
int len,
byte[] out,
int outoff)
Transmit data. |
byte[] |
Transmit(int cla,
int ins,
int p1,
int p2,
byte[] in)
Transmit data to the card. |
byte[] |
Transmit(int cla,
int ins,
int p1,
int p2,
byte[] in,
int le)
Transmit data to the card. |
byte[] |
Transmit(int cla,
int ins,
int p1,
int p2,
byte[] in,
int off,
int len)
Transmit data to the card. |
byte[] |
Transmit(int cla,
int ins,
int p1,
int p2,
byte[] in,
int off,
int len,
int le)
Transmit data to the card. |
byte[] |
Transmit(int cla,
int ins,
int p1,
int p2,
int p3,
byte[] in,
int off,
int le)
Transmit data to the card. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public final java.lang.String toString()
public final int getProto()
public final boolean getT0GetResponse()
public final void setT0GetResponse(boolean b)
public final boolean getResendOnWrongLe()
public final void setResendOnWrongLe(boolean b)
protected final void finalize()
public final void Disconnect()
public final void Disconnect(int param)
param
- PCSC.LEAVE_CARD, PCSC.RESET_CARD, PCSC.UNPOWER_CARD, PCSC.EJECT_CARD.public final void Reconnect(int dwSharedMode, int dwPreferredProtos, int dwInitialization)
dwSharedMode
- PCSC.SHARE_EXCLUSIVE, PCSC.SHARE_SHARED or PCSC.SHARE_DIRECT.dwPreferredProtos
- PCSC.PROTOCOL_T0, PCSC.PROTOCOL_T1, PCSC.PROTOCOL_RAW, PCSC.PROTOCOL_ANY.dwInitialization
- PCSC.LEAVE_CARD, PCSC.EJECT_CARD, PCSC.RESET_CARD and PCSC.UNPOWER_CARD.public final byte[] Transmit(Apdu apdu)
public final byte[] Transmit(byte[] in, int off, int len)
in
- buffer holding the APDU.off
- offset into buffer where the APDU starts.len
- length of APDU.
public final byte[] Transmit(int cla, int ins, int p1, int p2, int p3, byte[] in, int off, int le)
cla
- CLA byte of APDU (byte #0)ins
- INS byte of APDU (byte #1)p1
- P1 byte of APDU (byte #2)p2
- P2 byte of APDU (byte #3)p3
- P3 or LC byte of APDU (byte #4). This byte is omitted if parameter has value -1, otherwise it contains number of bytes in buffer in sent to card.in
- byte array containing command data of APDU.off
- offset starting at which data sending is to beginle
- LE byte of APDU (appended to APDU). This byte is omitted if parameter has value -1.
PCSCException
- if communication failed or if some parameters are wrongpublic final byte[] Transmit(int cla, int ins, int p1, int p2, byte[] in, int off, int len, int le)
cla
- CLA byte of APDU (byte #0)ins
- INS byte of APDU (byte #1)p1
- P1 byte of APDU (byte #2)p2
- P2 byte of APDU (byte #3)in
- byte array containing command data of APDU.off
- offset starting at which data sending is to beginlen
- number of bytes to be transmittedle
- LE byte of APDU (appended to APDU). This byte is omitted if parameter has value -1.
PCSCException
- if communication failed or if some parameters are wrongpublic final byte[] Transmit(int cla, int ins, int p1, int p2, byte[] in, int le)
cla
- CLA byte of APDU (byte #0)ins
- INS byte of APDU (byte #1)p1
- P1 byte of APDU (byte #2)p2
- P2 byte of APDU (byte #3)in
- byte array containing command data of APDU.le
- LE byte of APDU (appended to APDU). This byte is omitted if parameter has value -1.
PCSCException
- if communication failed or if some parameters are wrongpublic final byte[] Transmit(int cla, int ins, int p1, int p2, byte[] in, int off, int len)
cla
- CLA byte of APDU (byte #0)ins
- INS byte of APDU (byte #1)p1
- P1 byte of APDU (byte #2)p2
- P2 byte of APDU (byte #3)in
- byte array containing command data of APDU.off
- offset starting at which data sending is to beginlen
- number of bytes to be transmitted
PCSCException
- if communication failed or if some parameters are wrongpublic final byte[] Transmit(int cla, int ins, int p1, int p2, byte[] in)
cla
- CLA byte of APDU (byte #0)ins
- INS byte of APDU (byte #1)p1
- P1 byte of APDU (byte #2)p2
- P2 byte of APDU (byte #3)in
- byte array containing command data of APDU.
PCSCException
- if communication failed or if some parameters are wrongpublic final int Transmit(byte[] in, int inoff, int len, byte[] out, int outoff)
in
- buffer holding the APDU.inoff
- offset into buffer where the APDU starts.len
- length of APDU.out
- buffer where to store the card result.outoff
- offset into buffer where to store reponse.
public final State Status()
public final void Status(State state)
state
- of the connection.public final void BeginTransaction()
public final void EndTransaction(int disposition)
disposition
- LEAVE_CARD, RESET_CARD, UNPOWER_CARD, EJECT_CARD.public final byte[] Control(int dwControlCode, byte[] in)
public final byte[] Control(int dwControlCode, byte[] in, int off, int len)
public final void SetAttrib(int dwAttribId, byte[] attr)
public final byte[] GetAttrib(int dwAttribId)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |