Java Doc for EnvelopeHandler.java in  » 6.0-JDK-Modules » j2me » sim » toolkit » 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 » sim.toolkit 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   sim.toolkit.ViewHandler
      sim.toolkit.EnvelopeHandler

EnvelopeHandler
final public class EnvelopeHandler extends ViewHandler (Code)
The EnvelopeHandler class contains basic methods to handle the Envelope data field. This class will be used by the Toolkit applet in order to have access to the current Envelope information. No constructor is available for the Toolkit applet. The EnvelopeHandler class is a Temporary JCRE Entry Point Object. The only way to get a EnvelopeHandler reference is through the getTheHandler() static method.

Toolkit Applet Example:


 private static final byte MY_TAG = (byte)0x54;
 private byte[] data;
 data = new byte[32];
 void processToolkit(byte event) throws ToolkitException {
 // get the EnvelopeHandler system instance
 EnvelopeHandler theEnv = EnvelopeHandler.getTheHandler();
 // look for MY_TAG TLV
 if (theEnv.findTLV(MY_TAG, (byte)1) != TLV_NOT_FOUND) {
 // check first element byte
 if (theEnv.getValueByte((short)0) == (byte)1) {
 // copy element part into data buffer
 theEnv.copyValue((short)1,
 data,
 (short)0,
 (short)(theEnv.getValueLength() - 1));
 }
 }
 }
 

version:
   8.3.0
See Also:   ViewHandler
See Also:   EnvelopeResponseHandler
See Also:   ProactiveHandler
See Also:   ToolkitException




Method Summary
public  bytegetEnvelopeTag()
     Returns the Envelope BER-TLV tag.
public  bytegetItemIdentifier()
     Returns the item identifier byte value from the first Item Identifier TLV element in the current Envelope data field.
public  shortgetSecuredDataLength()
     Looks for the length of the Secured Data from the Command Packet in the first SMS TPDU or Cell Broadcast Page Simple TLV contained in the Envelope handler.
public  shortgetSecuredDataOffset()
     Looks for the Secured Data from the Command Packet in the first SMS TPDU or Cell Broadcast Page Simple TLV contained in the Envelope handler.
public  shortgetTPUDLOffset()
     Looks for the TP-UDL field in the first TPDU TLV element in the Envelope data field.
public static  EnvelopeHandlergetTheHandler()
     Returns the single system instance of the EnvelopeHandler class.



Method Detail
getEnvelopeTag
public byte getEnvelopeTag()(Code)
Returns the Envelope BER-TLV tag. Envelope BER-TLV tag



getItemIdentifier
public byte getItemIdentifier() throws ToolkitException(Code)
Returns the item identifier byte value from the first Item Identifier TLV element in the current Envelope data field. If the element is available it becomes the TLV selected. item identifier
exception:
  ToolkitException - with the following reason codes:
  • UNAVAILABLE_ELEMENT in case of unavailableTLV element
  • OUT_OF_TLV_BOUNDARIES if the item identifier byte is missing in the Item Identifier Simple TLV



getSecuredDataLength
public short getSecuredDataLength() throws ToolkitException(Code)
Looks for the length of the Secured Data from the Command Packet in the first SMS TPDU or Cell Broadcast Page Simple TLV contained in the Envelope handler. This can be used on the events: - EVENT_FORMATTED_SMS_PP_ENV, EVENT_FORMATTED_SMS_PP_UPD, if the SMS TP-UD is formatted according to GSM03.48 Single Short Message. - EVENT_FORMATTED_SMS_CB, if the Cell Broadcast Page is formatted according to GSM 03.48. If the element is available it becomes the TLV selected. the length of the Secured Data contained in the first SMS TPDU or Cell Broadcast Page TLV element (without padding bytes). If the Secured Data length is zero, no exception shall be thrown.
exception:
  ToolkitException - with the following reason codes:
  • UNAVAILABLE_ELEMENT in case of unavailable SMS TPDU or Cell Broadcast Page TLV element or wrong data format



getSecuredDataOffset
public short getSecuredDataOffset() throws ToolkitException(Code)
Looks for the Secured Data from the Command Packet in the first SMS TPDU or Cell Broadcast Page Simple TLV contained in the Envelope handler. This can be used on the events: - EVENT_FORMATTED_SMS_PP_ENV, EVENT_FORMATTED_SMS_PP_UPD, if the SMS TP-UD is formatted according to GSM03.48 Single Short Message. - EVENT_FORMATTED_SMS_CB, if the Cell Broadcast Page is formatted according to GSM 03.48. If the element is available it becomes the TLV selected. the offset of the Secured Data first byte in the first SMS TPDU or Cell Broadcast Page TLV element. If the Secured Data length is zero the value returned shall be the SMS TPDU TLV length.
exception:
  ToolkitException - with the following reason codes:
  • UNAVAILABLE_ELEMENT in case of unavailable SMS TPDU or Cell Broadcast Page TLV element or wrong data format



getTPUDLOffset
public short getTPUDLOffset() throws ToolkitException(Code)
Looks for the TP-UDL field in the first TPDU TLV element in the Envelope data field. This method can be used on the events EVENT_FORMATTED_SMS_PP_ENV, EVENT_FORMATTED_SMS_PP_UPD, EVENT_UNFORMATTED_SMS_PP_ENV, EVENT_UNFORMATTED_SMS_PP_UPD. If the element is available it becomes the TLV selected. TPUDL offset in the first TPDU TLV element if TPUDL exists.The TPUD length can be recovered by using the getValueByte method in Handler class.
exception:
  ToolkitException - with the following reason codes:
  • UNAVAILABLE_ELEMENT in case of unavailable TPDU TLV element or if the TPUDL field does not exist



getTheHandler
public static EnvelopeHandler getTheHandler() throws ToolkitException(Code)
Returns the single system instance of the EnvelopeHandler class. The applet shall get the reference of the handler at its triggering, the beginning of the processToolkit method. reference of the system instance
exception:
  ToolkitException - with the following reason codes:
  • HANDLER_NOT_AVAILABLE if the handler is busy.



Fields inherited from sim.toolkit.ViewHandler
final protected static byte BER_TLV_TAG_OFFSET(Code)(Java Doc)
final protected static byte OFFSET_LC(Code)(Java Doc)
public static AccessSAT SATAccessor(Code)(Java Doc)
final protected static byte TPUD_OFFSET(Code)(Java Doc)
public static ToolkitInterface currentTI(Code)(Java Doc)
short currentTLVOffset(Code)(Java Doc)
short firstTLVOffset(Code)(Java Doc)

Methods inherited from sim.toolkit.ViewHandler
public byte compareValue(short valueOffset, byte[] compareBuffer, short compareOffset, short compareLength) throws NullPointerException, ArrayIndexOutOfBoundsException, ToolkitException(Code)(Java Doc)
public short copy(byte[] dstBuffer, short dstOffset, short dstLength) throws NullPointerException, ArrayIndexOutOfBoundsException, ToolkitException(Code)(Java Doc)
public short copyValue(short valueOffset, byte[] dstBuffer, short dstOffset, short dstLength) throws NullPointerException, ArrayIndexOutOfBoundsException, ToolkitException(Code)(Java Doc)
public byte findAndCompareValue(byte tag, byte[] compareBuffer, short compareOffset) throws NullPointerException, ArrayIndexOutOfBoundsException, ToolkitException(Code)(Java Doc)
public byte findAndCompareValue(byte tag, byte occurrence, short valueOffset, byte[] compareBuffer, short compareOffset, short compareLength) throws NullPointerException, ArrayIndexOutOfBoundsException, ToolkitException(Code)(Java Doc)
public short findAndCopyValue(byte tag, byte[] dstBuffer, short dstOffset) throws NullPointerException, ArrayIndexOutOfBoundsException, ToolkitException(Code)(Java Doc)
public short findAndCopyValue(byte tag, byte occurrence, short valueOffset, byte[] dstBuffer, short dstOffset, short dstLength) throws NullPointerException, ArrayIndexOutOfBoundsException, ToolkitException(Code)(Java Doc)
public byte findTLV(byte tag, byte occurrence) throws ToolkitException(Code)(Java Doc)
public static byte[] getAPDUBuffer(byte[] buffer)(Code)(Java Doc)
public static byte[] getAPDUBuffer()(Code)(Java Doc)
protected short getLastTLVOffset(byte[] buffer, short Lc)(Code)(Java Doc)
public short getLength() throws ToolkitException(Code)(Java Doc)
protected short getTLVOffset(byte[] buffer, byte tag, short Lc, short occurrence)(Code)(Java Doc)
public byte getValueByte(short valueOffset) throws ToolkitException(Code)(Java Doc)
public short getValueLength() throws ToolkitException(Code)(Java Doc)
public static void setAPDUBuffer(byte[] buffer, short length)(Code)(Java Doc)
public static void setAPDUBuffer(short length)(Code)(Java Doc)
public static void setOutBufferData(short length)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(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.