Java Doc for APDUManager.java in  » 6.0-JDK-Modules » j2me » com » sun » io » j2me » apdu » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » com.sun.io.j2me.apdu 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.io.j2me.apdu.APDUManager

APDUManager
public class APDUManager (Code)
This class provides an interface to the low level APDU protocol details as described below: 1. Manage Card power up/reset. 2. APDU scheduler-Can assign priorities to APDUs to synchronize card access. Synchronization is required between APDUs being sent by native telecom software and APDUs sent by J2ME application. The reference implementation will only have APDUs sent by the J2ME application which would all have the same priority. 3. APDU Dispatcher-Support APDU exchange with the card. It has transaction capabilities to receive the APDUs from applications on the consumer device and return the responses to the corresponding application. 4. J2ME applications are oblivious of the logical channel information. Getting the logical channel for communicating with the smart card application is the responsibility of the APDUManager which sends appropriate APDUs to the card to get the logical channels assigned for a new connection or close channels when the connection is closed.


Field Summary
static  Slot[]slots
     Contains references to all supported slots.


Method Summary
public static  voidcheckSlotNumber(int slot)
     Verifies that slot number is correct.
public static  voidcloseConnection(Handle h)
     Closes the connection.
public static  byte[]exchangeAPDU(Handle h, byte[] apduData)
     This public method takes in the command APDU in the form of a byte array and calls the native exchangeAPDU0 method to send the APDU to the card.
public static  byte[]getATR(int slot)
     This method returns the ATR received from the card.
Parameters:
  slot - the slot number ATR information received from the card at startup orreset.
public static  intgetSlotCount()
     Returns the number of slots. the number of slots.
public static  voidinitACL(int slot)
     Initializes ACL for the slot (if needed).
public static  booleanisSatSlot(int slot)
     Checks if this slot is SAT slot.
public static  HandleopenACLConnection(byte[] apdu, int slot)
     Opens a connection to a smart card for reading of ACL.
static  HandleopenSATConnection(int slot)
     Creates SAT connection.
public static  intparseDottedBytes(String src, byte[] dest, int offset)
     Parses string that contains hexadecimal byte values separated by dots.
public static  HandleselectApplication(byte[] selectAPDU, int slot)
     The public method which should be called when application selection is required.

Field Detail
slots
static Slot[] slots(Code)
Contains references to all supported slots.





Method Detail
checkSlotNumber
public static void checkSlotNumber(int slot) throws ConnectionNotFoundException(Code)
Verifies that slot number is correct. Invokes init method if necessary.
Parameters:
  slot - the slot number
throws:
  ConnectionNotFoundException - if slot number is wrong



closeConnection
public static void closeConnection(Handle h) throws IOException(Code)
Closes the connection.
Parameters:
  h - connection handle
exception:
  IOException - if there are any IO problems



exchangeAPDU
public static byte[] exchangeAPDU(Handle h, byte[] apduData) throws IOException(Code)
This public method takes in the command APDU in the form of a byte array and calls the native exchangeAPDU0 method to send the APDU to the card. If there are no errors, this method gets the response APDU data from the card and returns that.
Parameters:
  h - connection handle
Parameters:
  apduData - APDU data in byte array form response APDU data in byte array form
exception:
  IOException - if there are any IO problems



getATR
public static byte[] getATR(int slot)(Code)
This method returns the ATR received from the card.
Parameters:
  slot - the slot number ATR information received from the card at startup orreset. In case of I/O troubles returns null.



getSlotCount
public static int getSlotCount()(Code)
Returns the number of slots. the number of slots. If error occured it returns 0.



initACL
public static void initACL(int slot)(Code)
Initializes ACL for the slot (if needed). This method is invoked when an establishment of new connection is being performed.
Parameters:
  slot - The slot number



isSatSlot
public static boolean isSatSlot(int slot) throws IOException(Code)
Checks if this slot is SAT slot.
Parameters:
  slot - the slot number SAT check result
throws:
  IOException - If an error occured.



openACLConnection
public static Handle openACLConnection(byte[] apdu, int slot) throws IOException(Code)
Opens a connection to a smart card for reading of ACL. This method is called from reset method, so it does not need synchronized statement.
Parameters:
  apdu - The APDU that will be used for opening
Parameters:
  slot - Slot number new connection handle
exception:
  IOException - when a card is not present orconnection cannot be established with the card.



openSATConnection
static Handle openSATConnection(int slot) throws IOException(Code)
Creates SAT connection.
Parameters:
  slot - Slot number new connection handle
exception:
  IOException - when SIM is not present orconnection cannot be established with the card.



parseDottedBytes
public static int parseDottedBytes(String src, byte[] dest, int offset)(Code)
Parses string that contains hexadecimal byte values separated by dots. May throw runtime exceptions.
Parameters:
  src - source string
Parameters:
  dest - destination array
Parameters:
  offset - target offset number of bytes parsed



selectApplication
public static Handle selectApplication(byte[] selectAPDU, int slot) throws IOException(Code)
The public method which should be called when application selection is required. Calls an internal method.
Parameters:
  selectAPDU - byte encoded selection APDU
Parameters:
  slot - slot number new connection handle
exception:
  IOException - when selection is not successful



Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.