If oos printed null, what else you expect

to do? Your output stream is null so what do you want to write with null?

Note: I am not good in Networking though, but still a point of observation....