org.exolab.castor.xml

Class DebugHandler

Implemented Interfaces:
DocumentHandler

public class DebugHandler
extends java.lang.Object
implements DocumentHandler

A Simple DocumentHandler that intercepts SAX events and prints them to the console

Version:
$Revision: 1.1.1.1 $ $Date: 2003/03/03 07:09:09 $

Author:
Keith Visco

Field Summary

(package private) DocumentHandler
_handler
The DocumentHandler to forward events to
(package private) Writer
_out
The writer to report events to
(package private) boolean
newLine

Constructor Summary

DebugHandler(DocumentHandler handler)
Creates a new DebugHandler which forwards events to the given document handler
DebugHandler(DocumentHandler handler, Writer out)
Creates a new DebugHandler which forwards events to the given document handler

Method Summary

void
characters(char[] ch, int start, int length)
void
endDocument()
void
endElement(String name)
void
ignorableWhitespace(char[] ch, int start, int length)
void
processingInstruction(String target, String data)
void
setDocumentLocator(Locator locator)
void
startDocument()
void
startElement(String name, AttributeList atts)

Field Details

_handler

(package private)  DocumentHandler _handler
The DocumentHandler to forward events to


_out

(package private)  Writer _out
The writer to report events to


newLine

(package private)  boolean newLine

Constructor Details

DebugHandler

public DebugHandler(DocumentHandler handler)
Creates a new DebugHandler which forwards events to the given document handler

Parameters:
handler - the DocumentHandler to forward events to


DebugHandler

public DebugHandler(DocumentHandler handler,
                    Writer out)
Creates a new DebugHandler which forwards events to the given document handler

Parameters:
handler - the DocumentHandler to forward events to
out - the Writer to print debug information to

Method Details

characters

public void characters(char[] ch,
                       int start,
                       int length)
            throws org.xml.sax.SAXException


endDocument

public void endDocument()
            throws org.xml.sax.SAXException


endElement

public void endElement(String name)
            throws org.xml.sax.SAXException


ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
            throws org.xml.sax.SAXException


processingInstruction

public void processingInstruction(String target,
                                  String data)
            throws org.xml.sax.SAXException


setDocumentLocator

public void setDocumentLocator(Locator locator)


startDocument

public void startDocument()
            throws org.xml.sax.SAXException


startElement

public void startElement(String name,
                         AttributeList atts)
            throws org.xml.sax.SAXException


Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com