my server sends a string using a PrintWriter and a serialized ArrayList using ObjectOutputStream in this order:
the client has a codeCode:PrintWriter printOut = new PrintWriter(socket.getOutputStream(), true); ObjectOutputStream output = new ObjectOutputStream(socket.getOutputStream()); printOut.println("ack"); output.writeObject(resultRows);thats supposed to print out the "ack." but because the Server creates the ObjectOutputStream before it prints the "ack" the output is as such:Code:System.out.println(cmd);
as you can see, it prints out the "ack" along with the serialized ArrayList. im wondering if there is a way around this. it is important that I create the ObjectOutputStream BEFORE i send the "ack." any help (sooner than later) will be much appreciatedCode:?ack ?java.util.ArrayListx?-?Ö¦a?? ?I ?sizexp ?w? ?[Ljava.lang.String;¡-VtT?{G? xp ?t bdmillst Brandont ?Millst ?30t 32.0001


Reply With Quote


Bookmarks