MIDP packages - 3

30 April 2008

In this post, I will present the CLDC java.io, CLDC java.util along with collection classes.

Following are CLDC java.io output classes:

- ByteArrayOutputStream - It implements an output stream where data is written into a bytes array.

- DataOutput – It is simply an interface which provides (its implementation) writing primitive Java data types to a binary output stream support

- DataOutputStream – It is an implementation of DataOutput interface.

- DataOutputStream – It is an output stream that allows an application to write primitive Java data types in a portable way.

- OutputStream - It is an abstract class that is the superclass of all classes representing an output stream of bytes.

- OutputStreamReader - This takes characters and translates them into bytes according to a specified character encoding.

- PrintStream – It is used to add a convenient way to print a textual representation of data values.

- Writer – Write is an abstract class and is used for writing character streams.

The utility package is also available in CLDC and it contains the most frequently used classes from the J2SE java.util package. There exist following 4 collection classes and 1 interface:

- Enumeration – Its an interface which allows us to iterate through a collection of items, one at a time.

- Hashtable – It implements hashtable interface and maps keys to values.

- Stack - Last-in-first-out (LIFO) collection or stack of objects.

- Vector – A list which can store objects.

CLDC java.util also provides support for date and time classes apart from Random class.

- Calendar - Calendar class is an abstract class for getting and setting dates.

- Date – Date class represents a specific date and time. It can represent a Date with millisecond precision.

- Random – Random class is a utility class and is used to generate a stream of random int or long values.

- TimeZone – It’s a very useful class that is used to change the data time stamp to different zones. It also handles daylight savings adjustments.

del.icio.us:MIDP packages - 3  digg:MIDP packages - 3  spurl:MIDP packages - 3  wists:MIDP packages - 3  simpy:MIDP packages - 3  newsvine:MIDP packages - 3  blinklist:MIDP packages - 3  furl:MIDP packages - 3  reddit:MIDP packages - 3  fark:MIDP packages - 3  blogmarks:MIDP packages - 3  Y!:MIDP packages - 3  smarking:MIDP packages - 3  magnolia:MIDP packages - 3  segnalo:MIDP packages - 3  gifttagging:MIDP packages - 3

Top Of Page | Trackback

If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.

It will look like this: MIDP packages - 3

Leave a Reply