Using JAXB 2.0 to read XML messages off of a network
I am trying to read snippets of XML off of an InputStream obtained from a Socket. The behavior I expect is that Unmarshaller.unmarshall(InputStream) will return right after reading the end tag of a root element, allowing me to read multiple objects as they come over the InputStream.
The behavior I am seeing is that Unmarshaller.unmarshal(InputStream) never returns. What I've had to do is read the InputStream into a String until I manually detect the end tag and then give that String to unmarshall (via StringReader).
Is this the expected behavior or a bug? If this is expected behavior, is there some way to get my desired behavior?
P.S. I'm using the 20050407 release. Is there a newer one coming down the pipe or are we expected to build off of CVS now?