DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6099>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6099

StreamingCharReader consumes extra characters





------- Additional Comments From [EMAIL PROTECTED]  2002-01-29 19:45 -------
I've submitted a proposed patch for this bug. This modifies StreamingCharReader
so that it does not attempt to read the next character in the stream until it is
ready to process it. The main changes were:

Where loadNextChar()'s return value was not used, it was replaced with a call to
a new consumeChar() method. This method advances the current index, but does not
load the next character.

fMostRecentChar was replaced with a getMostRecentChar() method, which checks
whether or not the current character has been loaded before returning it.

An extra call to getMostRecentChar() was added before the one call to atEOF()
which did not already get the most recent character (so that fLength is correct).

loadFirstChar() was replaced with a prepareChunk() method which does not
actually load the first character.

loadMoreChars() was modified to only read one character at a time.

The result is that the reader will never block waiting for input or consume
extra input that it does not need to parse the current entity.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to