Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 92968 invoked by uid 500); 30 Oct 2001 15:20:23 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 92957 invoked from network); 30 Oct 2001 15:20:23 -0000 Message-ID: <3BDEC514.4A9FA878@levigo.de> Date: Tue, 30 Oct 2001 16:19:48 +0100 From: Joerg Henne X-Mailer: Mozilla 4.77 [en] (WinNT; U) X-Accept-Language: de,en,fr MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: [C2] patch to serializers References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N John, "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: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org