Hello, I posted this in the Java Forum because I believe it is better to know Java and the dynamics of the ObjectOutputStream than it is to know AS3 to answer this question. Writing with a DataOutputStream in Java you can terminate a line using a end of line escape sequence if read using a BufferedReader with the readLine() method. What terminates an ObjectOutputStream and how does the ObjectInputStream know when the ObjectOutputStream is done sending an object using WriteObject and ReadObject?

The reason I need to know this is because I would like to have the client AS3 based (a flash application). In order for the ActionScript 3.0 Socket class to read the object data correctly it needs to know how to parse the information. Mainly the AS3 client needs to know when the object transmission over the TCP protocol has completed so it can be stored and used later.

The objects in question are actually serialized byte arrays or strings so I don't think there is a compatibility issue.

Can someone explain or give a link to the format of a object sent through WriteObject() using the ObjectOutputStream and how the ObjectInputStream knows when the Object is done being received? Or if someone already made a class that handles this or posted an article about combining AS3 and Java (with the ObjectOutputStream.WriteObject() methods)?

Note that the WriteObject is the main focus of my question since I believe I can replicate the actions of ReadObject() of the ObjectInputStream.