Can you have an PrintWriter and ObjectOutputStream on the same sockets output stream?
out_stream = new PrintWriter(socket.getOutputStream(), true);
obj_stream = new ObjectOutputStream(socket.getOutputStream();
I would say yes but I don't think I would do it.
What is it you want to do?
PrintWriters in my classes I am keeping it separate whilst I work on it. However when I try and send an object w_obj.writeObject(obj); it throws and IOExpection.obj has to implement serializable public class obj implements SerializableYou can but you have to take care of buffering. A PrintWriter or an ObjectOutputStream accepts data, which it converts into bytes, to be sent on the underlying stream (here the socket) at some point. Buffering is about waiting a bit before writing out such bytes, so that the bytes can be sent in "big chunks" rather than individually.
Read the Javadoc about buffering, and use flush() on PrintWriter and ObjectOutputStream when you want to get sure that the bytes get written on the socket.