Question: Whenever I use `HttpConnection` Class in `Java ME`, `Android` or in `BlackBerry`, I uses `DataInputStream`/`DataOutputStream` class for reading & writing datas over remote server. However there are other class like `InputStream`/`OutputStream` which can be use for same purpose. I saw Question regarding `InputStream`/`OutputStream` class with `HttpConnection`. So I would like to know from experts that what are the differences between these two ?

Answer: 
**DataOutputStream** can only handle basic types.

It can only read/write **primtive types** and **Strings**.DataInput/OutputStream performs generally better because its much simpler. 

**ObjectInput/OutputStream** can read/write any **object type** was well as **primitives**. It is less efficient but much easier to use if you want to send complex data.

With the ObjectOutputStream class, instances of a class that implements `Serializable` can be written to the output stream, and can be read back with ObjectInputStream.

I would assume that the **Object\*Stream** is the **best choice** until you know that its **performance** is an issue.
**DataOutputStream** makes sure the data is formatted in a platform independent way

**OutputStream** only if you transfer raw binary data.

**DataOutputStream**-This is the big benefit.

There is no significant performance difference between both.