[jdom-interest] making SAXHandler class public?

Bernard D'Have bdha at SpiritSystems.be
Thu Feb 15 12:34:05 PST 2001

I have the same need when I use some classes that extend sax2 XMLFilterImpl
before I need a JDOM tree

a big +1


-----Original Message-----
From: jdom-interest-admin at jdom.org
[mailto:jdom-interest-admin at jdom.org]On Behalf Of Jan Peter Hecking
Sent: jeudi 15 fevrier 2001 0:12
To: jdom-interest at jdom.org
Subject: [jdom-interest] making SAXHandler class public?


A while ago I asked whether it would be possible to turn the SAXHandler
class used by the SAXBuilder internaly into a public class. Well, I
went ahead and did so in my JDOM source tree. In the attached program
one can see why I think this change is useful: there's no need any more
for those pesky Piped(Input|Output)Streams when trying to transform a
JDOM document into another JDOM document using the TrAX API. As the
J2SE API docs state:

------------------------------ snip --------------------------------
[...] Typically, data is read from a PipedInputStream object by one
thread and data is written to the corresponding PipedOutputStream
by some other thread. Attempting to use both objects from a single
thread is not recommended, as it may deadlock the thread. [...]
------------------------------ snip --------------------------------

I had this problem and using the SAXHandler directly is the most elegant
solution to this problem I think. It is probably a lot faster, too.

If there is no fundamental problem with turning the SAXHandler into a
public class I would like to suggest this change for the JDOM API.
No changes to the SAXHandler class or the SAXBuilder class are


Jan Peter Hecking                  jhecking at netgaroo.com
University of Rostock     Department of Computer Science
Homepage: http://www.informatik.uni-rostock.de/~jhecking

More information about the jdom-interest mailing list