cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Henne <>
Subject Re: [C2] patch to serializers
Date Tue, 30 Oct 2001 15:19:48 GMT

"Morrison, John" wrote:
> Joerg,
> I looked at the patch you supplied.  In the comments below you say...
> "The buffer created in AbstractSerializer was actually never used,
>  because all subclasses of AbstractSerializer either didn't use
>  super.setOutputStream()"
> but if you look, all the files you've patched have...
>              super.setOutputStream(out);
> Am I missing something?

ok, let's take e.g. the HTMLSerializer:

- the HTMLSerializer's setOutputStream method immediately calls
super.setOutputStream(out) which is
- the AbstractTextSerializer's implementation, which in turn will wrap the
output stream into a BufferedOutputStream and call super.setOutputStream()
with the buffered stream.
- Finally AbstractSerializer's setOutputStream method will simply set the
field this.output.
- The field this.output will then subsequently be used by the HTMLSerializer
to create a StreamResult.

Now, if you look at revision 1.4 of the HTMLSerializer, you can see that
super.setOutputStream was called, but the variable used to create the
StreamResult was the method parameter. As a result, any intervention of the
superclasses on the stream was in vain.

Joerg Henne

To unsubscribe, e-mail:
For additional commands, email:

View raw message