[jdom-interest] XMLOutputter & StringWriter

Alex Chaffee guru at edamame.stinky.com
Tue Jul 4 03:15:24 PDT 2000


On Mon, Jul 03, 2000 at 07:34:34PM +0200, Gabor Greif wrote:
> On Mon, Jul 3, 2000 19:07 Uhr, Jason Hunter <mailto:jhunter at collab.net>
> wrote:
> >  I propose we don't provide
> >
> >output(Document, Writer)
> >
> >and only provide
> >
> >output(Document, Writer, String encodingOfWriter)
> >
> 
> In my understanding all Writers are (unicode) character streams. This way
> you get rid of the encoding problem, that only arises when going to _byte_
> streams and vica versa. So you only need the encoding parameter for the
> character <--> byte stream transition.
> Since the proposed method does not involve byte streams, and all info in a
> Document is represented(able) as characters, encoding is not necessary.

In other words, let the Writer take care of it, that's its job!

Sounds logical to me... Unless (as Jason implied) the Servlet API is
broken somehow and doesn't let you, e.g., output a different encoding
from a servlet...

 - A

> 
> My knowledge comes from
> 
> http://java.sun.com/products/jdk/1.2/docs/guide/io/io.html
> 
> Regards,
> 
> 	Gabor
> 
> 
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com

-- 
Alex Chaffee                       mailto:alex at jguru.com
jGuru - Java News and FAQs         http://www.jguru.com/alex/
Creator of Gamelan                 http://www.gamelan.com/
Founder of Purple Technology       http://www.purpletech.com/
Curator of Stinky Art Collective   http://www.stinky.com/



More information about the jdom-interest mailing list