You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2002/01/29 15:59:02 UTC
DO NOT REPLY [Bug 6099] New: -
StreamingCharReader consumes extra characters
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
Summary: StreamingCharReader consumes extra characters
Product: Xerces-J
Version: 1.4.4
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Core
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: tterribe@argoneng.com
In the "Writing Applications" FAQ, under the question "How do I read data from a
stream as it arrives?" it is suggested that an instance of
org.apache.xerces.readers.StreamingCharReader be used to parse a document as it
arrives over a socket.
However, that class always reads ahead one character, so that even at the end of
an XML document, it will block, waiting for more input. In addition, it attempts
to read two characters at a time (to do some CR LF processing, though it appears
the behavior is identical if only one of those characters is available at a
time). This means that in a stream with multiple XML documents, it will always
consume one character that might belong to the next document, and may consume up
to two.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org