Class RejectingEntityResolver

  • All Implemented Interfaces:

    public class RejectingEntityResolver
    extends java.lang.Object
    implements org.xml.sax.EntityResolver
    Entity resolver that handles all entity resolution requests by returning an empty input source. This is to prevent "Arbitrary DTD inclusion in XML parsing".
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.xml.sax.InputSource resolveEntity​(java.lang.String publicId, java.lang.String systemId)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RejectingEntityResolver

        public RejectingEntityResolver()
    • Method Detail

      • resolveEntity

        public org.xml.sax.InputSource resolveEntity​(java.lang.String publicId,
                                                     java.lang.String systemId)
                                              throws org.xml.sax.SAXException,
        Specified by:
        resolveEntity in interface org.xml.sax.EntityResolver