Bug 1013 - not really a bug, but unexpected, undocumented beaviour !
Summary: not really a bug, but unexpected, undocumented beaviour !
Status: NEW
Alias: None
Product: Xerces-J
Classification: Unclassified
Component: SAX (show other bugs)
Version: 1.3.0
Hardware: All All
: P3 minor
Target Milestone: ---
Assignee: Xerces-J Developers Mailing List
Depends on:
Reported: 2001-03-18 10:57 UTC by Fabien TREGAN
Modified: 2004-11-16 19:09 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
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 ?