Code example for DefaultHandler

0
import org.xml.sax.ext.LexicalHandler;
import org.xml.sax.helpers.DefaultHandler;
 
public abstract class XMLReaderToReceiver implements XMLReader {
     
    private static final DefaultHandler IMMUTABLE_DEFAULT_HANDLER = new DefaultHandler();
 
    private ContentHandler contentHandler = IMMUTABLE_DEFAULT_HANDLER;
    private LexicalHandler lexicalHandler;
 
    private DTDHandler dtdHandler = IMMUTABLE_DEFAULT_HANDLER;
    private EntityResolver entityResolver = IMMUTABLE_DEFAULT_HANDLER;
    private ErrorHandler errorHandler = IMMUTABLE_DEFAULT_HANDLER;
 
    public XMLReaderToReceiver() { 
    } 
 
    public ContentHandler getContentHandler() { return contentHandler; } 
    public DTDHandler getDTDHandler() { return dtdHandler; }
    public EntityResolver getEntityResolver() { return entityResolver; }