< prev index next >

src/java.xml/share/classes/org/xml/sax/HandlerBase.java

Print this page


   1 /*
   2  * Copyright (c) 2000, 2006, 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


  49  *
  50  * <p>Application writers can extend this class when they need to
  51  * implement only part of an interface; parser writers can
  52  * instantiate this class to provide default handlers when the
  53  * application has not supplied its own.</p>
  54  *
  55  * <p>Note that the use of this class is optional.</p>
  56  *
  57  * @deprecated This class works with the deprecated
  58  *             {@link org.xml.sax.DocumentHandler DocumentHandler}
  59  *             interface.  It has been replaced by the SAX2
  60  *             {@link org.xml.sax.helpers.DefaultHandler DefaultHandler}
  61  *             class.
  62  * @since 1.4, SAX 1.0
  63  * @author David Megginson
  64  * @see org.xml.sax.EntityResolver
  65  * @see org.xml.sax.DTDHandler
  66  * @see org.xml.sax.DocumentHandler
  67  * @see org.xml.sax.ErrorHandler
  68  */

  69 public class HandlerBase
  70     implements EntityResolver, DTDHandler, DocumentHandler, ErrorHandler
  71 {
  72 
  73 
  74     ////////////////////////////////////////////////////////////////////
  75     // Default implementation of the EntityResolver interface.
  76     ////////////////////////////////////////////////////////////////////
  77 
  78     /**
  79      * Resolve an external entity.
  80      *
  81      * <p>Always return null, so that the parser will use the system
  82      * identifier provided in the XML document.  This method implements
  83      * the SAX default behaviour: application writers can override it
  84      * in a subclass to do special translations such as catalog lookups
  85      * or URI redirection.</p>
  86      *
  87      * @param publicId The public identifer, or null if none is
  88      *                 available.


   1 /*
   2  * Copyright (c) 2000, 2017, 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


  49  *
  50  * <p>Application writers can extend this class when they need to
  51  * implement only part of an interface; parser writers can
  52  * instantiate this class to provide default handlers when the
  53  * application has not supplied its own.</p>
  54  *
  55  * <p>Note that the use of this class is optional.</p>
  56  *
  57  * @deprecated This class works with the deprecated
  58  *             {@link org.xml.sax.DocumentHandler DocumentHandler}
  59  *             interface.  It has been replaced by the SAX2
  60  *             {@link org.xml.sax.helpers.DefaultHandler DefaultHandler}
  61  *             class.
  62  * @since 1.4, SAX 1.0
  63  * @author David Megginson
  64  * @see org.xml.sax.EntityResolver
  65  * @see org.xml.sax.DTDHandler
  66  * @see org.xml.sax.DocumentHandler
  67  * @see org.xml.sax.ErrorHandler
  68  */
  69 @Deprecated(since="1.5")
  70 public class HandlerBase
  71     implements EntityResolver, DTDHandler, DocumentHandler, ErrorHandler
  72 {
  73 
  74 
  75     ////////////////////////////////////////////////////////////////////
  76     // Default implementation of the EntityResolver interface.
  77     ////////////////////////////////////////////////////////////////////
  78 
  79     /**
  80      * Resolve an external entity.
  81      *
  82      * <p>Always return null, so that the parser will use the system
  83      * identifier provided in the XML document.  This method implements
  84      * the SAX default behaviour: application writers can override it
  85      * in a subclass to do special translations such as catalog lookups
  86      * or URI redirection.</p>
  87      *
  88      * @param publicId The public identifer, or null if none is
  89      *                 available.


< prev index next >