You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Michael Gratton <mj...@recalldesign.com> on 2001/05/23 04:04:54 UTC

SerializerToXML.flush() weirdness

Hi there,

In Xalan 2.0.1, it seems that either the class 
org.apache.xalan.serialize.SerializerToXML needs better documentation or 
an additional method or two.

The method flush() flushes the internal SerializerToXML buffer to the 
result stream, as you'd expect, but there could possibly be some 
confusion as it doesn't flush the result stream. This stream could be 
buffering data. This should probably be noted in the javadoc.

Also, flushWriter() can be called to flush the underlying stream, but 
only if the stream is a writer. There is are a few cases where the 
result stream will be an OutputStream and there's no way to flush that, 
other than calling getOutputStream().flush(), which is pretty inconsistent.

It is worth modifing flushBytes() and flushChars(), which are called by 
flush() to also flush the stream if m_shouldFlush is true? Or perhaps 
adding a flushStream() method?

Mike.

-- 
Michael Gratton         Recall Design Pty Ltd   tel: +61 8 8217 0500
Application Architect   www.recalldesign.com    fax: +61 8 8217 0555
mjg@recalldesign.com    53 Gilbert Street Adelaide SA 5000 Australia
                             <This space intentionally left blank>