... created by applying the static
valueOf() methods to a boolean, a char, an array of characters (char[]), an int, a long or
an arbitrary Java Object. With an Object, the String is created using the ... Datagram newDatagram(
int size) throws java.io.IOException;
public abstract Datagram newDatagram(byte[] buf,
int size) throws java.io.IOException;
public abstract Datagram newData...
... the following code:
var bData:BitmapData = new BitmapData(camera.width, camera.
¬ height);
is line creates a new instance of the BitmapData class. e two parameters
are for the width and height ... the Video instance is placed onstage using an
addChild() method. Here’s an example:
var camera:Camera = Camera.getCamera();
var video = new Video(160, 120);
video.attachCamera(camera);
addChi...
... Present in J2ME
10.3 J2ME Package Contents
3 08
3 08
309
310
11. java.io
Package java.io
ByteArrayInputStream
ByteArrayOutputStream
DataInput
DataInputStream
DataOutput
DataOutputStream ... O'Reilly at http://java.oreilly.com/. Books
that are of particular interest to J2ME programmers include:
Java in a Nutshell, by David Flanagan
A Java language tut...
... therefore share the same instances of all Java classes and other resources loaded
into the Java VM. Among other things, this means that data can be shared between
MIDlets, and the usual Java synchronization ... to call
setCurrent( ) to install a new Form containing the message and initiate the
operation in a separate thread. The original thread can then continue unblocked and
event...
... display) a Canvas from which the attribute
values are obtained, as shown in Example 5-1.
Example 5-1. Getting Display and Canvas Attributes for a Device
package ora.ch5;
import javax.microedition.lcdui.Canvas; ... LAYOUT_CENTER. Because LAYOUT_DEFAULT has
value 0, a layout value of LAYOUT_NEWLINE_BEFORE is equivalent to
LAYOUT_NEWLINE_BEFORE | LAYOUT_DEFAULT.
As a shorthand...
...
6.3.1 Sending a Datagram
To send a datagram, you have to obtain a Datagram object, populate it with the data to be
sent, and invoke the send( ) method. The DatagramConnection interface has four ... following methods:
public void drawArc(int x, int y, int width, int height, int startAngle,
int arcAngle)
J2ME in a Nutshell
185
data until it has enough to satisfy the appli...
... packages are provided:
java.io (but not LineNumberInputStream and StringBufferInputStream, which are
deprecated in J2SE)
java.lang
java.lang.ref
java.lang.reflect
java.math
java.net
java.security ...
java.security.acl
java.security.cert
java.security.interfaces
java.security.spec
java.text
java.util
java.util.jar
java.util.zip
J2ME in a Nutshell
221
Figure 6-5. A...
... and return values.
Inner classes
Groups all of the inner classes and interfaces defined by the class or interface.
For each inner class, there is a single-line synopsis. Each inner class also ... a listing of the classes and
interfaces included in the package. In this listing of package contents, classes
and interfaces are first grouped by general category (interfaces, classes, a...