Class NullEntityResolver

  • All Implemented Interfaces:
    Serializable, EntityResolver, EntityResolver2

    public class NullEntityResolver
    extends Object
    implements EntityResolver2, Serializable
    NullObject implementation for EntityResolver2 (used as an alternative to null checks).

    This implementation returns null to request that the parser open a regular URI connection to the system identifier.

    Author:
    Jody Garnett (Boundless)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static NullEntityResolver INSTANCE
      Singleton instance of PreventLocalEntityResolver
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected NullEntityResolver()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      InputSource getExternalSubset​(String name, String baseURI)  
      InputSource resolveEntity​(String publicId, String systemId)  
      InputSource resolveEntity​(String name, String publicId, String baseURI, String systemId)  
      • Methods inherited from class Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • INSTANCE

        public static final NullEntityResolver INSTANCE
        Singleton instance of PreventLocalEntityResolver
    • Constructor Detail

      • NullEntityResolver

        protected NullEntityResolver()
    • Method Detail

      • resolveEntity

        public InputSource resolveEntity​(String publicId,
                                         String systemId)
                                  throws SAXException,
                                         IOException
        Specified by:
        resolveEntity in interface EntityResolver
        Returns:
        null to request that the parser open a regular URI connection to the system identifier.
        Throws:
        SAXException
        IOException
      • getExternalSubset

        public InputSource getExternalSubset​(String name,
                                             String baseURI)
                                      throws SAXException,
                                             IOException
        Specified by:
        getExternalSubset in interface EntityResolver2
        Throws:
        SAXException
        IOException
      • resolveEntity

        public InputSource resolveEntity​(String name,
                                         String publicId,
                                         String baseURI,
                                         String systemId)
                                  throws SAXException,
                                         IOException
        Specified by:
        resolveEntity in interface EntityResolver2
        Throws:
        SAXException
        IOException