public class JavaCardRemoteClient extends Object implements JavaCardInterface
| Constructor and Description |
|---|
JavaCardRemoteClient(String serverHost,
int serverIp) |
| Modifier and Type | Method and Description |
|---|---|
void |
changeProtocol(String protocol)
Switch protocol
Supported protocols are:
T=0 (alias: *)
T=1
T=CL, TYPE_A, T0 (alias: T=CL)
T=CL, TYPE_A, T1
T=CL, TYPE_B, T0
T=CL, TYPE_B, T1
|
javacard.framework.AID |
createApplet(javacard.framework.AID aid,
byte[] bArray,
short bOffset,
byte bLength)
Create
Applet instance in Simulator |
byte[] |
getATR()
Returns ATR
|
String |
getProtocol() |
javacard.framework.AID |
installApplet(javacard.framework.AID aid,
String appletClassName,
byte[] appletJarContents,
byte[] bArray,
short bOffset,
byte bLength)
Install
Applet into Simulator. |
javacard.framework.AID |
installApplet(javacard.framework.AID aid,
String appletClassName,
byte[] bArray,
short bOffset,
byte bLength)
Install
Applet into Simulator. |
javacard.framework.AID |
loadApplet(javacard.framework.AID aid,
String appletClassName)
Load
Applet into Simulator |
javacard.framework.AID |
loadApplet(javacard.framework.AID aid,
String appletClassName,
byte[] appletJarContents)
Load
Applet into Simulator |
void |
reset()
Powerdown/Powerup
|
boolean |
selectApplet(javacard.framework.AID aid)
Select applet by it's AID
It's method must be called before start working with applet instance
|
byte[] |
selectAppletWithResult(javacard.framework.AID aid)
Select applet by it's AID
It's method must be called before start working with applet instance
|
byte[] |
transmitCommand(byte[] data)
Transmit APDU to previous selected applet
If no applet was selected returns
byte[2]
with status word 0x6986 (Command not allowed (no current EF)) |
public JavaCardRemoteClient(String serverHost, int serverIp) throws RemoteException, NotBoundException
RemoteExceptionNotBoundExceptionpublic javacard.framework.AID loadApplet(javacard.framework.AID aid,
String appletClassName)
throws javacard.framework.SystemException
JavaCardInterfaceApplet into SimulatorloadApplet in interface JavaCardInterfaceaid - applet aidappletClassName - fully qualified applet class name StringAIDjavacard.framework.SystemException - if appletClass not instanceof
javacard.framework.Appletpublic javacard.framework.AID loadApplet(javacard.framework.AID aid,
String appletClassName,
byte[] appletJarContents)
throws javacard.framework.SystemException
JavaCardInterfaceApplet into SimulatorloadApplet in interface JavaCardInterfaceaid - applet aidappletClassName - fully qualified applet class name StrinappletJarContents - contains a byte array containing a jar file with an applet and its dependent classesAIDjavacard.framework.SystemException - if appletClass not instanceof
javacard.framework.Appletpublic javacard.framework.AID createApplet(javacard.framework.AID aid,
byte[] bArray,
short bOffset,
byte bLength)
throws javacard.framework.SystemException
JavaCardInterfaceApplet instance in SimulatorcreateApplet in interface JavaCardInterfaceaid - applet aidbArray - the array containing installation parametersbOffset - the starting offset in bArraybLength - the length in bytes of the parameter data in bArrayAIDjavacard.framework.SystemException - if exception in Applet.install(..)
method occurs.public javacard.framework.AID installApplet(javacard.framework.AID aid,
String appletClassName,
byte[] bArray,
short bOffset,
byte bLength)
throws javacard.framework.SystemException
JavaCardInterfaceApplet into Simulator.
This method is equal to:
loadApplet(...);
createApplet(...);
installApplet in interface JavaCardInterfaceaid - applet aid or nullappletClassName - fully qualified applet class name StrinbArray - the array containing installation parametersbOffset - the starting offset in bArraybLength - the length in bytes of the parameter data in bArrayAIDjavacard.framework.SystemException - if appletClass not instanceof
javacard.framework.Appletpublic javacard.framework.AID installApplet(javacard.framework.AID aid,
String appletClassName,
byte[] appletJarContents,
byte[] bArray,
short bOffset,
byte bLength)
throws javacard.framework.SystemException
JavaCardInterfaceApplet into Simulator.
This method is equal to:
loadApplet(...);
createApplet(...);
installApplet in interface JavaCardInterfaceaid - applet aid or nullappletClassName - fully qualified applet class name StrinappletJarContents - Contains a byte array containing a jar file with an applet and its dependent classesbArray - the array containing installation parametersbOffset - the starting offset in bArraybLength - the length in bytes of the parameter data in bArrayAIDjavacard.framework.SystemException - if appletClass not instanceof
javacard.framework.Appletpublic boolean selectApplet(javacard.framework.AID aid)
JavaCardInterfaceselectApplet in interface JavaCardInterfaceaid - appletIdpublic byte[] getATR()
CardInterfacegetATR in interface CardInterfacepublic byte[] transmitCommand(byte[] data)
CardInterfacebyte[2]
with status word 0x6986 (Command not allowed (no current EF))transmitCommand in interface CardInterfacedata - command apduCommandAPDU,
ResponseAPDUpublic void reset()
CardInterfacereset in interface CardInterfacepublic byte[] selectAppletWithResult(javacard.framework.AID aid)
JavaCardInterfaceselectAppletWithResult in interface JavaCardInterfaceaid - appletIdpublic void changeProtocol(String protocol)
JavaCardInterfaceT=0 (alias: *)T=1T=CL, TYPE_A, T0 (alias: T=CL)T=CL, TYPE_A, T1T=CL, TYPE_B, T0T=CL, TYPE_B, T1changeProtocol in interface JavaCardInterfaceprotocol - protocol to usepublic String getProtocol()
getProtocol in interface JavaCardInterfaceJavaCardInterface.changeProtocol(String)