SAX: Character Streams

David Megginson ak117 at freenet.carleton.ca
Mon Apr 13 16:18:04 BST 1998


Tyler Baker writes:

 > > At the bottom level, a characterStream interface is a good idea.
 > > Having constructors for these that take an asciiByteStream, an
 > > iso8859ByteStream and (I guess) a UTF8InputStream and produce
 > > seems awfully convenient. -Tim

 > This seems like a pretty reasonable idea.  This would also allow
 > parser writers to provide their own byte to character converters
 > which may in fact be more efficient than the
 > sun.io.ByteToCharConverter and sun.io.CharToByteConverter classes
 > which do all of this stuff now in the JDK.  

Just a quick note: using java.io.Reader would not require people to
use Sun's character converters, unless the implementor chose to use
java.io.InputStreamReader or something similar.  You could always
subclass Reader to use your own character converters anyway.

That said, I'm happy to be persuaded to use SAXCharacterStream (or
SAXUTF16Stream) and SAXByteStream -- they'd make life much easier for
CORBA types.  The Java people will complain quite a bit that I'm not
using Reader and InputStream, but I can prepare a friendly canned
reply for them.


All the best,


David

-- 
David Megginson                 ak117 at freenet.carleton.ca
Microstar Software Ltd.         dmeggins at microstar.com
      http://home.sprynet.com/sprynet/dmeggins/

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list