Hi! I write to a socket's outputstream like;
pw = new PrintWriter(s.getOutputStream());
after that i need to write some object, so i use a code like this;
ObjectOutputStream oos = new ObjectOutputStream(s.getOutputStream());
I get an StreamCorrupted Exception. If i donot use the printwriter first, it is working.
How to change the way i can write to a socket's outputstream?