Programming Java 2 Micro Edition for Symbian OS 2004 (779882), страница 77
Текст из файла (страница 77)
It allows the developer to tryto free all the memory he can and maybe give the application anotherchance to perform the requested action. In the worst case scenario, theapplication should be able to display a previously allocated dialog boxto inform the user that the application cannot continue.Appendix 2MIDP LibrariesNetworking PackageThis interface is the mostbasic type of genericconnection.javax.microedition.io.ConnectorThis class is a placeholder forthe static methods used tocreate all the connectionobjects.javax.microedition.io.CommConnectionThis interface defines alogical serial port connection.javax.microedition.io.ContentConnection This interface defines thestream connection overwhich content is passed.javax.microedition.io.DatagramThis is the generic datagraminterface.javax.microedition.io.DatagramConnection This interface defines thecapabilities that a datagramconnection must have.javax.microedition.io.HttpConnectionThis interface defines thenecessary methods andconstants for an HTTPconnection.javax.microedition.io.HttpsConnectionThis interface defines thenecessary methods andconstants to establish a securenetwork connection.javax.microedition.io.InputConnectionThis interface defines thecapabilities that an inputstream connection must have.javax.microedition.io.ConnectionProgramming Java 2 Micro Edition on Symbian OS: A developer’s guide to MIDP 2.0.
Martin de Jode 2004 Symbian Ltd ISBN: 0-470-09223-8430MIDP LIBRARIESjavax.microedition.io.OutputConnectionjavax.microedition.io.PushRegistryjavax.microedition.io.SecureConnectionjavax.microedition.io.SecurityInfojavax.microedition.io.ServerSocketConnectionjavax.microedition.io.SocketConnectionjavax.microedition.io.StreamConnectionjavax.microedition.io.StreamConnectionNotifierjavax.microedition.io.UDPDatagramConnectionThis interface defines thecapabilities that an outputstream connection must have.This class maintains a list ofinbound connections.This interface defines thesecure socket streamconnection.This interface defines themethods for accessinginformation about a secureconnection.This interface defines theserver socket streamconnection.This interface defines thesocket stream connection.This interface defines thecapabilities that a streamconnection must have.This interface defines thecapabilities that a connectionnotifier must have.This interface defines adatagram connection whichknows the local end pointaddress.Exceptionjavax.microedition.io.ConnectionNotFoundExceptionSignals that the protocol forthe connection is notsupported by the device.User Interface Classesjavax.microedition.lcdui.Alertjavax.microedition.lcdui.AlertTypeA screen that shows data tothe user and waits for acertain period of timebefore proceeding to thenext screen.Provides an indication ofthe nature of alerts.USER INTERFACE CLASSES431The base class for writingapplications that need tohandle low-level eventsand to issue graphicscalls for drawing to thedisplay.javax.microedition.lcdui.ChoiceThis interface defines an APIfor user interface componentsthat enable the user to selectfrom a predefined number ofchoices.javax.microedition.lcdui.ChoiceGroupA group of selectableelements intended to beplaced within a Form.javax.microedition.lcdui.CommandA construct that encapsulatesthe semantic information ofan action.javax.microedition.lcdui.CommandListener This interface is used byapplications which need toreceive high-level events fromthe implementation.javax.microedition.lcdui.CustomItemA customizable elementwhich can be subclassed tointroduce new visual andinteractive elements to aForm.javax.microedition.lcdui.DateFieldAn editable component forpresenting date and time(calendar) information thatmay be placed in a Form.javax.microedition.lcdui.DisplayRepresents the manager of thedisplay and GUI capabilitiesof the system.javax.microedition.lcdui.DisplayableAn object that can be placedon the display.javax.microedition.lcdui.FontRepresents fonts and fontmetrics.javax.microedition.lcdui.FormA Screen that contains anarbitrary mixture of items:read-only text fields, editabletext fields, editable datefields, gauges, choice groupsand custom items.javax.microedition.lcdui.Canvas432MIDP LIBRARIESjavax.microedition.lcdui.Gaugejavax.microedition.lcdui.Graphicsjavax.microedition.lcdui.Imagejavax.microedition.lcdui.ImageItemjavax.microedition.lcdui.Itemjavax.microedition.lcdui.ItemCommandListenerjavax.microedition.lcdui.ItemStateListenerjavax.microedition.lcdui.Listjavax.microedition.lcdui.Screenjavax.microedition.lcdui.Spacerjavax.microedition.lcdui.StringItemjavax.microedition.lcdui.TextBoxjavax.microedition.lcdui.TextFieldjavax.microedition.lcdui.TickerImplements a graphicaldisplay, such as a bar graph,of an integer value.Provides simple 2D geometricrendering capability.Used to hold graphical imagedata.An Item that contains animage.A superclass for componentsthat can be added to aForm.This interface is a listener typefor receiving notification ofcommands that have beeninvoked on Item objects.This interface is used byapplications which need toreceive events that indicatechanges in the internal state ofthe interactive items within aForm screen.A screen containing a list ofchoices.The common superclass of allhigh-level user interfaceclasses.A blank, non-interactive Itemthat has a settable minimumsize.A non-interactive Item thatcan contain a string.A screen that allows the userto enter and edit text.An editable text componentthat may be placed in a Form.Implements a ”ticker tape”, apiece of text that runscontinuously across thedisplay.Game APIjava.microedition.lcdui.game.GameCanvas This class provides the basisfor a game user interface.MIDLET CLASSESjava.microedition.lcdui.game.Layerjava.microedition.lcdui.game.LayerManagerjava.microedition.lcdui.game.Spritejava.microedition.lcdui.game.TiledLayer433An abstract classrepresenting a visualelement of a game.The LayerManagermanages a series of Layers.A basic visual element thatcan be rendered with oneof several frames stored inan image; different framescan be shown to animatethe Sprite.A visual element composedof a grid of cells that can befilled with a set of tileimages.Media APIjava.microedition.media.Controljava.microedition.media.Controllablejava.microedition.media.Managerjava.microedition.media.MediaExceptionjava.microedition.media.Playerjava.microedition.media.PlayerListenerjava.microedition.media.control.ToneControljava.microedition.media.control.VolumeControlA superclass for objectsused to control some mediaprocessing functions.An interface for obtainingthe Controls from anobject.The access point forobtainingsystem-dependentresources such as Playersfor multimedia processing.Indicates an unexpectederror condition in amethod.Controls the rendering oftime-based media data.An interface for receivingasynchronous eventsgenerated by Players.An interface that enablesthe playback ofuser-defined monotonictone sequences.An interface formanipulating the audiovolume of a Player.434MIDP LIBRARIESMidlet Classesjavax.microedition.midlet.Midletjavax.microedition.midlet.Midlet.StateChangeExceptionSuperclass for all MIDPapplications.Signals that a requestedMIDlet state change failed.Persistent Storagejavax.microedition.rms.InvalidRecordIDExceptionjavax.microedition.rms.RecordComparatorjavax.microedition.rms.RecordEnumerationjavax.microedition.rms.RecordFilterjavax.microedition.rms.RecordListenerjavax.microedition.rms.RecordStorejavax.microedition.rms.RecordStoreExceptionjavax.microedition.rms.RecordStoreFullExceptionjavax.microedition.rms.RecordStoreNotFoundExceptionjavax.microedition.rms.RecordStoreNotOpenExceptionThrown to indicate anoperation could not becompleted because therecord ID was invalid.An interface used tocompare two records.
Animplementation checkswhether they match or whattheir relative sort order is.An interface representing abi-directional record storerecord enumerator.An interface used to filterrecords matching acriterionA listener interface forreceiving record changed,added or deleted eventsfrom a RecordStore.A class representing arecord store.Thrown to indicate ageneral exception wasencountered in aRecordStore operation.Thrown to indicate that theoperation could not becompleted because theRecordStore is full.Thrown to indicate that theRecordStore could notbe found.Thrown to indicate that theoperation was attempted ona closed RecordStore.CORE PACKAGES435End-to-End Securityjava.microedition.pki.Certificatejava.microedition.pki.CertificateExceptionInterface common tocertificates.Encapsulates an error thatoccurred while a certificateis being used.Core Packagesjava.iojava.langjava.lang.refjava.lang.reflectjava.mathjava.netjava.securityjava.security.certProvides the system inputand output through datastreams and serialization.Provides the classes that arefundamental to the designof the Java language.
Forexample, Object, which isthe root of the classhierarchy.Provides the referenceobject classes, whichsupport a limited degree ofinteraction with thegarbage collector.Provides the classes andinterfaces for obtainingreflective informationabout classes andobjects.Provides classes forperformingarbitrary-precision integer(BigInteger) and decimalarithmetic (BigDecimal).Provides classes forimplementing networkingapplications.Provides classes andinterfaces for the securityframework.Provides classes andinterfaces for parsing andmanaging certificates.436java.textjava.utiljava.util.jarjava.util.zipjavax.microedition.ioMIDP LIBRARIESProvides classes andinterfaces for handling text,dates, numbers andmessages in a mannerindependent of naturallanguages.Provides classes whichcontain the collectionsframework, legacycollection classes, eventmodel, date and timefacilities,internationalization andmiscellaneous utility classessuch as string tokenizer andrandom number generator.Provides classes for readingand writing the JAR fileformat, which is basedupon standard ZIP fileformat with an optionalmanifest file.Provides classes for readingand writing the standardZIP and GZIP file formats.Provides classes for thegeneric connectionframework.Appendix 3Using the Wireless Toolkit Toolsat the Command LineThis appendix provides developers with an insight into how the compile,pre-verify and packaging process works when using the Wireless Toolkitat the command line.In the first instance we should make sure we have all the relevantbinaries within the view of our command line.