W3C home > Mailing lists > Public > www-jigsaw@w3.org > November to December 1996

Streaming HTML generation

From: Anselm Baird_Smith <abaird@www43.inria.fr>
Date: Thu, 26 Dec 1996 09:42:05 +0100 (MET)
Message-Id: <199612260842.JAA12446@www43.inria.fr>
To: Mark Friedman <mark@intraspect.com>
Cc: www-jigsaw@www10.w3.org

Mark Friedman writes:
 > Is there a way to use the HTMLGenerator class to stream HTML back to a
 > browser. i.e. return the HTML as it's generated instead of waiting until it's
 > all generated?

The current HTML generator doesn't support this, it's probably its
worst drawback (ie this will soon reach top prority :-)

 > If not, is there any way to do it?

The most simple way is to define a new subclass of InputStream, that
creates the output on demand when its read method is called
(SSIResource uses such a trick, as does CgiResource - in some sense).

A much less efficient way is to use PipedStream (avoid them as much as
possible - at least the java.io impl, they are really slow).

If any of the above doesn't match your needs, let me know

Anselm.
BTW: ResourceStore API *is* changing, not up to what we have discussed
yet, but enough to make it possible (more on this latter)
Received on Thursday, 26 December 1996 03:43:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:25 GMT