`"Wireless Messaging API (WMA) for JavaTM 2 Micro Edition Version 1.0"
`
`I, Harold Ogle, based on my personal knowledge and information, hereby declare as follows:
`
`I am an employee of Oracle America, Inc., successor-in-interest to Sun Microsystems, Inc., and
`
`hold the position of Program Manager in the Program Management Office ("PMO"), which I have held
`
`since 15 February 2010. Prior to 15 February 2010, I was an employee of Sun Microsystems, Inc. and
`
`held the office of Program Manager in the PMO from May 2000.
`
`Oracle America, Inc. operates the Java Community Process ("JCP") website (www.jcp.org),
`
`which serves as the repository for documents relating to the Community Development of Java
`
`Technology Specifications.
`
`Java Specifications are developed and approved through the Java Specification Request ("JSR")
`
`process. The PMO publishes in an online repository drafts, releases and other documents throughout
`
`the JSR process. The PMO establishes a dedicated public JSR webpage on the JCP website for each
`
`Specification approved for development or revision that contains a history of the passage of the
`
`Specification, including a record of the decisions, actions, and votes taken by the Executive Committee
`
`with respect to the Specification's development through the JSR process.
`
`Among my responsibilities as Program Manager, I act as a custodian of records relating to the
`
`JSR process, and I am familiar with the record keeping practices relating to that process, including the
`
`creation and maintenance of each Specification's dedicated public JSR webpage.
`
`I make this declaration based on my personal knowledge and information contained in the
`
`business records of the JCP and PMO as they are published on www.jcp.org, or on my confirmation
`
`with other responsible PMO personnel with such knowledge.
`
`When a new draft, release, or other document is published, an announcement of its publication,
`
`with information on how to access the draft, release, or other document, is typically sent out to JCP
`
`members within 24 hours of the publication.
`
`Apple Inc.
`Ex. 1018 - Page 1
`
`
`
`Any draft, release or other document published on the JCP website was reasonably accessible to
`
`the public and was disseminated or otherwise available to the extent that persons interested and
`
`ordinarily skilled in the subject matter or art exercising reasonable diligence could have located it
`
`easily. In particular, the title and description of each JSR are indexed (for example, by platform,
`
`technology, stage, and committee) and placed in a public online repository with descriptive links to the
`
`documents published on the applicable JSR webpage. There is also a search feature that allows the
`
`fields of JSR Title and JSR Description to be searched using user-inputted, free-form text.
`
`The drafts, releases, and other documents are published and kept in an online repository in the
`
`course of the PMO's regularly conducted activity and ordinary course of business. The records are made
`
`pursuant to established JCP procedures and are relied upon by the PMO and other JCP peronnel and
`
`members in the performance of their functions.
`
`It is the regular practice of the PMO to make, keep, and publish the JCP records.
`
`Based on the business records of the JCP and the PMO's course of conduct in publishing drafts,
`
`releases and other documents relating to JSRs, I have determined that the publication date of the
`
`Specification associated with JSR-000120, entitled "Wireless Messaging API (WMA) for JavaTM 2
`
`Micro Edition Version 1.0," was no later than August 21, 2002, at which time it was reasonably
`
`accessible to the public on the JCP website. A copy of that Specification is attached to this declaration as
`
`Exhibit A.
`
`Pursuant to Section 1746 of Title 28 of United States Code, I declare under penalty of perjury
`
`under the laws of the United States of America that the foregoing is true and correct and that the
`
`foregoing is based upon personal knowledge and information and is believed to be true.
`
`Signed:
`
`Harol Oe
`
`v
`
`Date
`
`Apple Inc.
`Ex. 1018 - Page 2
`
`
`
`Exhibit A
`Exhibit A
`
`
`
`“Apple Inc.
`Ex. 1018 - Page 3
`
`Apple Inc.
`Ex. 1018 - Page 3
`
`
`
`Apple Inc.
`Ex. 1018 - Page 4
`
`Apple Inc.
`Ex. 1018 - Page 4
`
`
`
`Wireless Messaging
`API (WMA)
`
`for JavaTM 2 Micro Edition
`
`Version 1.0
`
`JSR 120 Expert Group
`JSR-120-EG@JCP.ORG
`
`Java Community Process (JCP)
`
`Apple Inc.
`Ex. 1018 - Page 5
`
`
`
`Copyright 0 2002 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, California 94303, U.S.A. All
`rights reserved.
`
`Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is
`described in this document. In particular, and without limitation, these intellectual property rights may include
`one or more of the U.S. patents listed at http://www.sun.com/patents and one or more additional patents or
`pending patent applications in the U.S. and in other countries.
`
`This document and the product to which it pertains are distributed under licenses restricting their use, copying,
`distribution, and decompilation. No part of the product or of this document may be reproduced in any form by
`any means without prior written authorization of Sun and its licensors, if any.
`
`Third-party software, including font technology, is copyrighted and licensed from Sun suppliers.
`
`Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered trademarks of Sun Microsystems,
`Inc. in the U.S. and other countries.
`
`Federal Acquisitions: Commercial Software - Government Users Subject to Standard License Terms and
`Conditions.
`
`DOCUMENTATION IS PROVIDED "AS IS" AND ALL EXPRESS OR IMPLIED CONDITIONS,
`REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF
`MERCHANTABILITY, FITNESS FOR FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE
`DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY
`INVALID.
`
`Copyright 0 2002 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, California 94303, Etats-Unis,
`Taus droits reserves.
`
`Sun Microsystems, Inc. a les droits de propriete intellectuels relatants a la technologie incorporee dans le
`produit qui est &era dans ce document. En particulier, et sans la li nation, ces droits de propriete intellectuels
`peuvent include un ou plus des brevets atnericains enumeres a http://www.sun.com/patents et un ou les brevets
`plus supplementaires ou les applications de brevet en attente dans les Etats - Unis et dans les autres pays.
`
`Ce produit ou document est protege par un copyright et distribue avec des licences qui en restreignent
`1'utilisation, la copie, la distribution, et la &compilation. Aucune partie de ce produit ou document ne peut etre
`reproduite sous aucune forme, parquelque moyen que ce soit, sans 1'autorisation prealable et &rite de Sun et de
`ses bailleurs de licence, s'il y ena.
`
`Le logiciel &term par des tiers, et qui comprend la technologie relative aux polices de caracteres, est protege par
`un copyright et licencie par des fournisseurs de Sun.
`
`Sun, Sun Microsystems, le logo Sun et Java sont des marques de fabrique ou des marques deposees de Sun
`Microsystems, Inc. aux Etats-Unis et dans d'autres pays.
`
`LA DOCUMENTATION EST FOURNIE "EN L'ETAT" ET TOUTES AUTRES CONDITIONS,
`DECLARATIONS ET GARANTIES EXPRESSES OU TACITES SONT FORMELLEMENT EXCLUES,
`DANS LA MESURE AUTORISEE PAR LA LOI APPLICABLE, Y COMPRIS NOTAMMENT TOUTE
`GARANTIE IMPLICI IL RELATIVE A LA QUA LI TE MARCHANDE, A L'APTITUDE A UNE
`UTILISATION PARTICULIERE OU A L'ABSENCE DE CONTREFAcON.
`
`Apple Inc.
`Ex. 1018 - Page 6
`
`
`
`Contents
`
`Preface
`
`Overview
`
`avax.mic roeditionio
`Connector
`avax.wireless.messaging
`BinaryMessage
`Message
`MessageConnection
`IVIessageListener
`TextMess age
`Appendix A. GSM SMS Adapter
`Appendix B. GSM Cell Broadcast Adapter
`Appendix C. CDMA IS-637 SMS Adapter
`
`Almanac
`
`Index
`
` 1
` 5
`6
` 11
` 13
` 15
` 17
`22
`25
`27
`
` 37
`39
` 43
`45
`
`iii
`
`Apple Inc.
`Ex. 1018 - Page 7
`
`
`
`Contents
`
`Contents
`
`iv
`iv
`
`Apple Inc.
`Ex. 1018 - Page 8
`
`Apple Inc.
`Ex. 1018 - Page 8
`
`
`
`Preface
`
`This book provides information on the messaging API which is included in the JSR 120 Wireless Messaging
`API (WMA) specification. It also describes Sun Microsystem's reference implementation (RI) of the API.
`
`Who Should Use This Book
`This book is intended primarily for those individuals and companies who want to implement WMA, or to port
`the WMA RI to a new platform.
`
`Before You Read This Book
`This book assumes that you have experience programming in the C and JavaTM languages, and that you have
`experience with the platforms to which you are porting the RI. It also assumes that you are familiar with the
`Mobile Information Device Profile (MIDP), the Connected, Limited Device Configuration (CLDC), and the
`Connected Device Configuration (CDC).
`
`Familiarity with multimedia processing recommended, but not required.
`
`References
`GSM 03.40 v7.4.0 Digital cellular telecommunications system (Phase 21); Technical realization of the Short
`Message Service (SMS). ETSI 2000
`
`TS 100 900 v7.2.0 (GSM 03,38) Digital cellular telecommunications system (Phase 2+); Alphabets and
`language-specific information. ETSI 1999
`Mobile Information Device Profile (MIDP) Specification, Version 1.0 , Sun Microsystems, 2000
`GSM 03.41, ETSI Digital Cellular Telecommunication Systems (phase 2+); Technical realization of Short
`Message Service Cell Broadcast (SMSCB) (GSM 03A1)
`Wireless Datagram Protocol , Version 14-Jun-2001, Wireless Application Protocol WAP-259-WDP-20010614-
`aWAP (W.DP)
`TWEL4-637-A: Short Message Service for Spread Spectrum Systems (1S637)
`Connected Device Configuration (CDC) and the Foundation Profile, a white paper, (Sun Microsystems, Inc.,
`2002)
`J2AlErm CDC Specification, v1.0, (Sun Microsystems, Inc., 2002)
`Porting Guide for the Connected Device Configuration, Version 1.0, and the Foundation Profile, Version 1.0;
`(Sun Microsystems, Inc., 2001)
`
`Related Documentation
`The JavaTm Language Specification by James Gosling, Bill Joy, and Guy L. Steele (Addison-Wesley, 1996),
`ISBN 0-201-63451-1
`
`Apple Inc.
`Ex. 1018 - Page 9
`
`
`
`Preface
`
`The JavaTM Virtual Machine Specification (Java Series), Second Edition by Tim Lindholm and Frank Yellin
`(Addison-Wesley, 1999), ISBN 0-201-43294-3
`
`Terms, Acronyms, and Abbreviations Used in this Book
`SMS - Short Message Service
`
`URL - Uniform Resource Locator
`
`Typographic Conventions
`
`Typeface Meaning
`
`AaBbCc123 The names of commands, files, and directories; on-screen computer
`output
`
`AaBbCc 12 3 What you type, when contrasted with on-screen computer output
`
`AuBbCc.123
`
`Book titles, new words or terms, words to he emphasized
`Command-line variable; replace with a real name or value
`
`Examples
`
`. login file.
`Edit your
`Use is -a to list all fi les.
`% You have mail.
`
`3; su
`Password:
`
`Read Chapter 6 in the User's Guide,
`These are called class options.
`You must be superuser to do this.
`To delete a tile, type rm filename .
`
`Accessing Sun Documentation Online
`The docs . sun. corn web site enables you to access Sun technical documentation on the Web. You can
`browse the docs.sun.com archive or search for a specific book title or subject at:
`http://docs.sun.com
`
`Sun Welcomes Your Comments
`We are interested in improving our documentation and welcome your comments and suggestions. You can
`email your comments to us at:
`
`wma-comments@sun.com
`
`vi
`
`Apple Inc.
`Ex. 1018 - Page 10
`
`
`
`Overview
`
`CHAPTER
`
`Description
`The messaging API is based on the Generic Connection Framework (GCF), which is defined in the Connected
`Limited Device Configuration (CLDC) 1.0 specification. The package j avax . microedit ion. io defines
`the framework and supports input/output and networking functionality in J2ME profiles. It provides a coherent
`way to access and organize data in a resource-constrained environment.
`The design of the messaging functionality is similar to the datagram functionality that is used for UDP in the
`Generic Connection Framework. Like the datagram functionality, messaging provides the notion of opening a
`connection based on a string address and that the connection can be opened in either client or server mode.
`However, there are differences between messages and datagrams, so messaging interfaces do not inherit from
`datagram. It might also be confusing to use the same interfaces for messages and datagrams.
`The interfaces for the messaging API have been defined in the j avax. wire less . messaging package.
`
`Representation of a message
`A message can be thought of as having an address part and a data part. A message is represented by a class that
`implements the interface defined for messages in the API. This interface provides methods that are common for
`all messages. In the j avax wireless . messaging package, the base interface that is implemented by all
`messages is named Message. It provides methods for addresses and timestamps.
`For the data part of the message, the API is designed to handle both text and binary messages. These are
`represented by two subinterfaces of Message: TextMes sage and BinaryMes sage. These subinterfaces
`provide ways to manipulate the payload of the message as Strings and byte arrays, respectively.
`Other subinterfaces of Message can be defined for message payloads which are neither pure text nor pure
`binary. It is also possible to create further subinterfaces of TextMe s s age and B inaryMessage for possible
`protocol-specific features.
`
`Sending and receiving messages
`As defined by the Generic Connection Framework, the message sending and receiving functionality is
`implemented by a Connect ion interface, in this case, MessageConnection. To make a connection, the
`application obtains an object implementing the MessageConnection from the Connector class by
`providing a URL connection string that identifies the address.
`If the application specifies a full destination address that defines a recipient to the Connector, it gets a
`MessageConnection that works in a "client" mode. This kind of Connection can only be used for
`sending messages to the address specified when creating it.
`The application can create a "server" mode MessageConnection by providing a URL connection string
`that includes only an identifier that specifies the messages intended to be received by this application. Then it
`can use this MessageConnection object for receiving and sending messages.
`The format of the URL connection string that identifies the address is specific to the messaging protocol used.
`For sending messages, the MessageConnection object provides factory methods for creating message
`objects. For receiving messages, the MessageConnection supports an event listener-based receive
`mechanism, in addition to a synchronous blocking receive 0 method. The methods for sending and
`
`Apple Inc.
`Ex. 1018 - Page 11
`
`
`
`Overview
`
`receiving messages can throw a SecurityExcept ion if the application does not have the permission to
`perform these operations.
`The generic connection framework includes convenience methods for getting input Stream and
`Output Stream handles for connections which are st reamConnec t ion.s. The MessageConnec t ion
`does not support stream based operations. If an application calls the Connector open*S tream methods,
`they will receive an illegalArgumentExcept ion.
`
`Bearer-specific Adapter
`The basic MessageConnec t'ion and message framework provides a general mechanism with establishing
`a messaging application. The appendices describe the specific adapter requirements for URL connection string
`formatting and bearer-specific message handling requirements.
`
`• JavaDoc API Documentation
`
`• Appendix A - GSM SMS Adapter
`
`• Appendix B - GSM CBS Adapter
`
`• Appendix C - CDMA IS-637 SMS Adapter
`
`The appendices of this specification include the definition of SMS and CBS URL connection strings. These
`connection schemes MAY be reused in other adapter specifications, as long as the specified syntax is not
`modified and the usage does not overlap with these specified adapters (that is, no platform can be expected to
`implement two protocols for which the URI scheme would be the same, making it impossible for the platform to
`distinguish which is desired by the application). Other adapter specifications MAY define new connection
`schemes, as long as these do not conflict with any other connection scheme in use with the Generic Connection
`Framework.
`
`The appendices describe how the SMS and CBS adpaters MUST be implemented to conform to the
`requirements of their specific wireless network environments and how these adapters supply the functionality
`defined in the javax.wireless. messaging package.
`When a GSM SMS message connection is established, the platform MUST use the rules in Appendix A for the
`syntax of the URL connection string and for treatment of the message contents.
`When a GSM CBS message connection is established, the platform MUST use the rules in Appendix B for the
`syntax of the URL connection string and for treatment of the message contents.
`When a CDMA SMS message connection is established, the platform MUST use the rules in Appendix C for
`the syntax of the URL connection string and for treatment of the message contents.
`
`Security
`To send and receive messages using this API, applications MUST be granted a permission to perform the
`requested operation. The mechanisms for granting a permission are implementation dependent.
`The permissions for sending and receiving MAY depend on the type of messages and addresses being used. An
`implementation MAY restrict an application's ability to send some types of messages and/or sending messages
`to certain recipient addresses. These addresses can include device addresses and/or identifiers, such as port
`numbers, within a device.
`An implementation MAY restrict certain types of messages or connection addresses, such that the permission
`would never be available to an application on that device.
`The applications MUST NOT assume that successfully sending one message implies that they have the
`permission to send all kinds of messages to all addresses.
`
`2
`
`Apple Inc.
`Ex. 1018 - Page 12
`
`
`
`Overview
`
`An application should handle SecurityExcept ions when a connection handle is provided from
`Connector . open (url) and for any message receive ( ) or send ( ) operation that potentially engages
`with the network or the privileged message storage on the device.
`
`Permissions for MIDP 1.0 Platform
`When the JSR120 interfaces are deployed on a MIDP 1.0 device, there is no formal mechanism to identify how
`a permission to use a specific feature can be granted to a running application. On some systems, the decision to
`permit a particular operation is left in the hands of the end user. If the user decides to deny the required
`can be thrown from the Connector,
`open ( ) , the
`permission, then a SecurityException
`( ) method.
`MessageConnection. send ( ) , or the MessageConnection.
`receive
`
`How to Use the Messaging API
`This section provides some examples of how the messaging API can be used.
`
`Sending a text message to an end user
`The following sample code sends the string "Hello World!" to an end user as a normal SMS message.
`
`try {
`String addr = "sms://+358401234567";
`MessageConnection conn = (MessageConnection) Connector.open(addr);
`TextMessage msg =
`(TextMessage)conn.newMessage(MessageConnection.TEXT MESSAGE);
`msg.setPayloadText("Hello World!");
`conn.send(msg);
`) catch (Exception e) {
`
`A server that responds to received messages
`The following sample code illustrates a server application that waits for messages sent to port 5432 and
`responds to them.
`
`3
`
`Apple Inc.
`Ex. 1018 - Page 13
`
`
`
`Overview
`
`try
`String addr = "sms://:5432";
`MessageConnection conn = (MessageConnection) Connector.open(addr);
`Message msg = null;
`
`while (someExitCondition)
`// wait for incoming messages
`
`msg = conn.receive();
`// received a message
`if (msg instanceof TextMessage) {
`TextMessage tmsg = (TextMessage)msg;
`
`String receivedText = tmsg.getPayloadText();
`// respond with the same text with "Received:"
`// inserted in the beginning
`tmsg.setPayloadText("Received:" receivedText);
`// Note that the recipient address in the message is
`// already correct as we are reusing the same object
`
`conn.send(tmsg);
`} else {
`// Received message was not a text message, but e.g. binary
`
`}
`} catch (Exception e)
`
`Messaging Interfaces
`
`j avax . wireless
`ng
`
`. messagi
`
`This package defines an API which allows applications to send and receive wireless
`messages.
`
`Networking Package
`
`javax . miertpedit ion ia
`
`This paeakge includes the platibrm networking interfaces modified for use on platforms
`supporting the message connections.
`
`4
`
`Apple Inc.
`Ex. 1018 - Page 14
`
`
`
`CHAP TER
`
`Package
`javax.microedition.io
`
`Description
`This pacakge includes the platform networking interfaces modified for use on platforms supporting the message
`connections.
`This package includes the Connector class from MIDP 2.0 which includes securityExcept ion as an
`expected return from calls to open ( ) which may require explicit authorization.
`When the message connection is implemented on a MIDP 1.0 platform the Sec-ur ityExc ept ion MAY be
`provided by a a platform dependent authorization mechanism. e.g. the user MAY be prompted to ask if the
`application may send a message mid the user's denial interpretted as a Securi tyExcepti on.
`
`ii0:::5.0:iiitn0.1y:
`
`71:
`
`Interfaces
`
`Classes
`Connect or
`
`Exceptions
`
`This class is factory for creating new Connect ion objects.
`
`5
`
`Apple Inc.
`Ex. 1018 - Page 15
`
`
`
`Connector
`
`javax.rnicroedition.io
`
`javax.microedition.io
`Connector
`
`Declaration
`public class Connector
`
`java.lang.Object
`
`+--javax.mioroedition.io.Connector
`
`Description
`This class is factory for creating new Connection objects.
`The creation of connections is performed dynamically by looking up a protocol implementation class whose
`name is formed from the platform name (read from a system property) and the protocol name of the requested
`connection (extracted from the parameter string supplied by the application programmer). The parameter string
`that describes the target should conform to the URL format as described in RFC 2396. This takes the general
`form:
`(scheme) [ (target)] [ (parms)]
`where:
`• scheme is the name of a protocol such as HTTP.
`• target is normally some kind of network address.
`• parms are formed as a series of equates of the form ; x.y. For example: ; type=a.
`An optional second parameter may be specified to the open function. This is a mode flag that indicates to the
`protocol handler the intentions of the calling code. The options here specify if the connection is going to be read
`(READ), written (WRITE), or both (READ—WRITE). The validity of these flag settings is protocol dependent.
`For example, a connection for a printer would not allow read access, and would throw an
`legalArgumentException. If the mode parameter is not specified, READ—WRITE is used by default.
`An optional third parameter is a boolean flag that indicates if the calling code can handle timeout exceptions. If
`this flag is set, the protocol implementation may throw an InterruptedIOExcept
`ion when it detects a
`timeout condition. This flag is only a hint to the protocol handler, and it does not guarantee that such exceptions
`will actually be thrown. lf this parameter is not set, no timeout exceptions will be thrown.
`Because connections are frequently opened just to gain access to a specific input or output stream, convenience
`functions are provided for this purpose. See also: Da t agramConnec tion for information relating to
`datagram addressing
`
`Since: CLDC LO
`
`l5Ittr.Lee
`
`=tar , -
`
`static
`static
`static int WRITE
`
`int READ
`int READ—WRITE
`
`Fields
`
`6
`
`Apple Inc.
`Ex. 1018 - Page 16
`
`
`
`javax.mieroedition.io
`
`Connector
`READ
`
`C.Member.SUmruary.
`
`Methods
`static Connection open(java.lang.String name)
`static Connection open(java.lang.String name, int mode)
`static Connection open(java.lang.String name, int mode, Boolean timeouts)
`static openDataInputStream(java.lang.String name)
`java.io.DataInputStrea
`m
`static openDataOutputStream(java.lang.String name)
`java.io.DataOutputStre
`am
`static openinputStream(java.lang.String name)
`java.io.InputStream
`static openOutputStream(java.lang.String name)
`java.io.OutputStream
`
`Inherited Member Summary
`
`Methods inherited from class Obj eat
`
`equals(Object), getClass(), hashCode(), notify(), notifyAll(), toString(), wait(),
`wait(), wait()
`
`Fields
`
`READ
`
`Declaration:
`public static final int READ
`
`Description:
`Access mode READ.
`
`READ WRITE
`
`Declaration:
`public static final int READ_WEITE
`
`Description:
`Access mode READ WRITE.
`
`WRITE
`
`Declaration:
`public static final int WRITE
`
`Description:
`Access mode WRITE.
`
`7
`
`Apple Inc.
`Ex. 1018 - Page 17
`
`
`
`javax.microedition.io
`
`Connector
`open(String)
`
`Methods
`
`open(String)
`
`Declaration:
`public static javax.microedition.io.Connection open(java.lang.String name)
`throws I0Exception
`
`Description:
`Creates and opens a Connection.
`
`Parameters:
`name - the URL for the connection
`
`Returns: a new Connection object
`
`Throws:
`IllegalArgumentException - if a parameter is invalid
`
`ConnectionNotFoundException - if the requested connection cannot be made, or the protocol
`type does not exist
`
`j ava io . TOException - if some other kind of I/O error occurs
`
`SecurityException - if a requested protocol handler is not permitted
`
`open(String, int)
`
`Declaration:
`public static javax.microedition.io.Connection open(java.lang.String name, int mode)
`throws I0Exception
`
`Description:
`Creates and opens a Connection.
`
`Parameters:
`name - the URL for the connection
`
`mode - the access mode
`
`Returns: a new Connection object
`
`Throws:
`IllegalArgumentException - if a parameter is invalid
`
`ConnectionNotFoundException - if the requested connection cannot be made, or the protocol
`type does not exist
`
`ava io . I0Exception - if some other kind of I/O error occurs
`SecurityException - if a requested protocol handler is not permitted
`
`open(String, ink, Boolean)
`
`Declaration:
`public static javax.microedition.io.Connection open(java.lang.String name, int mode,
`boolean timeouts)
`throws I0Exception
`
`Description:
`Creates and opens a Connection.
`
`8
`
`Apple Inc.
`Ex. 1018 - Page 18
`
`
`
`javax.microedition.io
`
`Connector
`openDatalnputStream(String)
`
`Para meters:
`name - the URL for the connection
`
`mode - the access mode
`
`t imeout s - a flag to indicate that the caller wants timeout exceptions
`
`Returns: a new Connection object
`
`Throws:
`IllegalArgumentException - if a parameter is invalid
`ConnectionNotFoundException - if the requested connection cannot be made, or the protocol
`type does not exist
`
`j ava io I0Exception - if some other kind of 1/0 error occurs
`
`SecurityException - if a requested protocol handler is not permitted
`
`openDatalnputStream(String)
`
`Declaration:
`public static java.io.DataInputStream openDataInputStream(java.lang.String name)
`throws I0Exception
`
`Description:
`Creates and opens a connection input stream.
`
`Parameters:
`name - the URL for the connection
`
`Returns: a DataInputStream
`
`Throws:
`lilegalArgumentException - if a parameter is invalid
`
`ConnectionNotFoundException - if the connection cannot be found
`
`j ava lo . I0Exception - if some other kind of 110 error occurs
`SecurityException - if access to the requested stream is not permitted
`
`openDataOutputStream(String)
`
`Declaration:
`public static java.io.DataOutputStream openDataOutputStream(java.lang.String name)
`throws I0Exception
`
`Description:
`Creates and opens a connection output stream.
`
`Parameters:
`name - the URL for the connection
`
`Returns: a DataOutputStream
`
`Throws:
`IllegalArgumentException - if a parameter is invalid
`ConnectionNotFoundException - if the connection cannot be found
`
`j ava lo, I0Exception - if some other kind of I/O error occurs
`SecurityException - if access to the requested stream is not permitted
`
`9
`
`Apple Inc.
`Ex. 1018 - Page 19
`
`
`
`Connector
`openlnputStreain(String)
`
`opettinputStream(String)
`
`javax.rnieroedition.io
`
`Declaration:
`public static javaAo.InputStream openinputStream(java.lang.String name)
`throws I0Exception
`
`Description:
`Creates and opens a connection input stream.
`
`Parameters:
`name - the URL for the connection
`
`Returns: an InputStream
`
`Throws:
`IllegalArguinentException - if a parameter is invalid
`
`Connect ionNot FoundExcepti on - if the connection cannot be found
`
`j ava o I0Except ion - if some other kind of 1/0 error occurs
`
`SecurityException - if access to the requested stream is not permitted
`
`open OutputStream(String)
`
`Declaration:
`public static java.io.OutputStream openOutputStreamjava.lang.8tring name)
`throws IOException
`
`Description:
`Creates and opens a connection output stream.
`
`Parameters:
`name - the URL. for the connection
`
`Returns: an Outputs tream
`
`Th rows:
`illegalArgurnentException - if a parameter is invalid
`
`Connect ionNot FoundExcept ion - if the connection cannot be found
`
`j ava o I0Except i on - if some other kind of I/O error occurs
`
`SecurityException - if access to the requested stream is not permitted
`
`10
`
`Apple Inc.
`Ex. 1018 - Page 20
`
`
`
`CHAPTER
`
`Package
`avax.wireless.messaging
`
`Description
`This package defines an API which allows applications to send and receive wireless messages. The API is
`generic and independent of the underlying messaging protocol. The underlying protocol can be, for example,
`GSM Short Message Service, CDMA SMS, and so on.
`
`Overview
`This package is designed to work with Message objects that may contain different elements depending on the
`underlying messaging protocol. This is different from Datagrams that are assumed always to be blocks of
`binary data.
`
`An adapter specification for a given messaging protocol may define further interfaces derived from the
`Message interfaces included in this generic specification.
`Unlike network layer datagrams, the wireless messaging protocols that are accessed by using this API are
`typically of store-and-forward nature. Messages will usually reach the recipient, even if the recipient is not
`connected at the time of sending. This may happen significantly later if the recipient is disconnected for a long
`period of time. Sending and possibly also receiving these wireless messages typically involves a financial cost
`to the end user that cannot be neglected. Therefore, applications should not send unnecessary messages.
`
`The MessageConnection and Message Interfaces
`The MessageConnection interface represents a Connect ion that can be used for sending and receiving
`messages. The application opens a MessageConnection with the Generic Connection Framework by
`providing a URL connection string.
`The me s sageConnect ion can be opened either in "server" or in "client" mode. A "server" mode connection
`is opened by providing a URL that specifies an identifier for an application on the local device for incoming
`messages. A port -number is an example of an identifier. Messages received with this identifier will then be
`delivered to the application by using this connection. A "server" mode connection can be used both for sending
`and for receiving messages.
`A "client" mode connection is opened by providing a URL that points to another device. A "client" mode
`connection can only be used for sending messages.
`The messages are represented by the Message interface and interfaces derived from it. The Message
`interface has the very basic functions that are common to all messages. Derived interfaces represent messages of
`different types and provide methods for accessing type-specific features. The kinds of derived interfaces that are
`supported depends on the underlying messaging protocol. if necessary, interfaces derived from Message can
`be defined in the adapter definitions for mapping the API to an underlying protocol.
`The mechanism to derive new interfaces from the Message is intended as an extensibility mechanism allowing
`new protocols to be supported in platforms. Applications are not expected to create their own classes that
`implement the Message interface. The only correct way for applications to create object instances
`implementing the Message interface is to use the MessageConnection. newMes sage factory method.
`
`11
`
`Apple Inc.
`Ex. 1018 - Page 21
`
`
`
`javax.wireless.messaging
`
`Since: WMA LO
`
`Interfaces
`
`BinaryMessage
`
`An interfiice representing a binary message.
`