Bug 1013

Summary: not really a bug, but unexpected, undocumented beaviour !
Product: Xerces-J Reporter: Fabien TREGAN <treguy>
Component: SAXAssignee: Xerces-J Developers Mailing List <xerces-j-dev>
Status: NEW ---    
Severity: minor    
Priority: P3    
Version: 1.3.0   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Fabien TREGAN 2001-03-18 10:57:26 UTC
I needed to transform XML datas from an InputStream.
Since that InputSource is from a Socket, and since I do not want to use 
stream.close() (wich inplie socket.close() !) to 'tell' that the XML sending is 
done, I made my own InputStream, wich get a '0' has an 'EndOfData' signal.

Though this work to send all my messages, and construct String from them, it do 
not work with transformer.transforme(zeroTerminatedInputStream).

The problem is that when my stream receive a second message, it stop 
considering that 'EndOfData' is reached, and no longer return '-1' when it's 
read. BUT, while parsing the stream, Xerces need TWO '-1' to 
the 'inputstream.read()' : the first make read return a number < than the 
amount of byte wanted, and the second make read return '-1'.

Since returning '-1' only once cause transformer.transform(InputStream) non-
returning, but cause no prroblem with other object, this -might- be considered 
has a bug, or at least somthing that the doc must warn you about... don't you 
think ?