< prev index next >

src/java.xml/share/classes/org/xml/sax/ext/DefaultHandler2.java

Print this page


   1 /*
   2  * Copyright (c) 2004, 2005, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 // DefaultHandler2.java - extended DefaultHandler
  27 // http://www.saxproject.org
  28 // Public Domain: no warranty.
  29 // $Id: DefaultHandler2.java,v 1.2 2004/11/03 22:49:08 jsuttor Exp $
  30 
  31 package org.xml.sax.ext;
  32 
  33 import java.io.IOException;
  34 import org.xml.sax.InputSource;
  35 import org.xml.sax.SAXException;
  36 import org.xml.sax.helpers.DefaultHandler;
  37 
  38 
  39 /**
  40  * This class extends the SAX2 base handler class to support the
  41  * SAX2 {@link LexicalHandler}, {@link DeclHandler}, and
  42  * {@link EntityResolver2} extensions.  Except for overriding the
  43  * original SAX1 {@link DefaultHandler#resolveEntity resolveEntity()}
  44  * method the added handler methods just return.  Subclassers may
  45  * override everything on a method-by-method basis.
  46  *
  47  * <blockquote>
  48  * <em>This module, both source code and documentation, is in the
  49  * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
  50  * </blockquote>
  51  *
  52  * <p> <em>Note:</em> this class might yet learn that the
  53  * <em>ContentHandler.setDocumentLocator()</em> call might be passed a
  54  * {@link Locator2} object, and that the
  55  * <em>ContentHandler.startElement()</em> call might be passed a
  56  * {@link Attributes2} object.
  57  *
  58  * @since 1.5, SAX 2.0 (extensions 1.1 alpha)
  59  * @author David Brownell
  60  */
  61 public class DefaultHandler2 extends DefaultHandler
  62     implements LexicalHandler, DeclHandler, EntityResolver2
  63 {
  64     /** Constructs a handler which ignores all parsing events. */
  65     public DefaultHandler2 () { }
  66 
  67 
  68     // SAX2 ext-1.0 LexicalHandler
  69 
  70     public void startCDATA ()


   1 /*
   2  * Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 





  26 package org.xml.sax.ext;
  27 
  28 import java.io.IOException;
  29 import org.xml.sax.InputSource;
  30 import org.xml.sax.SAXException;
  31 import org.xml.sax.helpers.DefaultHandler;
  32 
  33 
  34 /**
  35  * This class extends the SAX2 base handler class to support the
  36  * SAX2 {@link LexicalHandler}, {@link DeclHandler}, and
  37  * {@link EntityResolver2} extensions.  Except for overriding the
  38  * original SAX1 {@link DefaultHandler#resolveEntity resolveEntity()}
  39  * method the added handler methods just return.  Subclassers may
  40  * override everything on a method-by-method basis.





  41  *
  42  * <p> <em>Note:</em> this class might yet learn that the
  43  * <em>ContentHandler.setDocumentLocator()</em> call might be passed a
  44  * {@link Locator2} object, and that the
  45  * <em>ContentHandler.startElement()</em> call might be passed a
  46  * {@link Attributes2} object.
  47  *
  48  * @since 1.5, SAX 2.0 (extensions 1.1 alpha)
  49  * @author David Brownell
  50  */
  51 public class DefaultHandler2 extends DefaultHandler
  52     implements LexicalHandler, DeclHandler, EntityResolver2
  53 {
  54     /** Constructs a handler which ignores all parsing events. */
  55     public DefaultHandler2 () { }
  56 
  57 
  58     // SAX2 ext-1.0 LexicalHandler
  59 
  60     public void startCDATA ()


< prev index next >