Java Reference
In-Depth Information
Changes to Timer Behavior
Although not part of the CLDC proper, it's worth calling out the Timer and TimerTask
classes here, as they're the only MIDP classes in the java.util hierarchy. Drawn from Java
SE, the Timer class lets you schedule a TimerTask to be performed at some time in the
future. As with Java SE, simply subclass TimerTask overriding run , and then use a Timer
instance to schedule the operation. Of course, your MIDlet must be running; for back-
ground wake-up behavior, consider using an alarm (see the “Managing Startup Events
and Alarms” section in Chapter 4).
Changes to the java.io Package
Table 2-4 lists the supported classes in the java.io package.
Table 2-4. java.io Classes Supported by CLDC Version
CLDC 1.0
CLDC 1.1
ByteArrayInputStream
ByteArrayInputStream
ByteArrayOutputStream
ByteArrayOutputStream
DataInput
DataInput (interface)
DataInputStream
DataInputStream
DataOutput
DataOutput (interface)
DataOutputStream
DataOutputStream
EOFException
EOFException
InputStream
InputStream
InputStreamReader
InputStreamReader
InterruptedIOException
InterruptedIOException
IOException
IOException
OutputStream
OutputStream
OutputStreamWriter
OutputStreamWriter
PrintStream
PrintStream
Reader
Reader
UnsupportedEncodingException
UnsupportedEncodingException
UTFDataFormatException
UTFDataFormatException
Writer
Writer
 
Search WWH ::




Custom Search