Ram,
I feel your pain. Coming from Java land lots of things will feel backward or missing. NSData is your starting point but it works more like ByteArray stream classes as it holds the materialized data. Also beware that there are no formatting functions for serializing/deserializing data written/read to/from the source. In other words you won't find readInt(), readShort() in here. Do this: Cmd+Shift+? from XCode to call up help, type NSData to bring up the docs for it then click the link for the binary programming guide. Having dealt with an issue that may be exactly what you're about to hit, I'll warn you about the endian-ness of reading data on the iPhone from a stream that was written by Java. You'll have to swap byte orders from low to high. In other words if you use a DataOutputStream.writeInt() on one end (in something like a servlet) then try to map an int over the data read into an NSData object then swap byte orders.