Class SAXBuffer

  • All Implemented Interfaces:
    Serializable, ContentHandler, LexicalHandler

    public class SAXBuffer
    extends Object
    implements ContentHandler, LexicalHandler, Serializable
    A class that can record SAX events and replay them later.

    Compared to the old Cocoon.XMLByteStreamCompiler, this class is many times faster at sending out the recorded SAX events since it doesn't need to convert between byte and char representations etc. On the other hand, its data structure is more complex then a simple byte array, making XMLByteStreamCompiler better in case the recorded SAX should be stored long-term.

    Use this class if you need to frequently generate smaller amounts of SAX events, or replay a set of recorded start events immediately.

    Both ContentHandler and LexicalHandler are supported, the only exception is that the setDocumentLocator event is not recorded.

    See Also:
    Serialized Form