Class FixedDtdEntityResolver

  • All Implemented Interfaces:
    org.xml.sax.EntityResolver

    public class FixedDtdEntityResolver
    extends java.lang.Object
    implements org.xml.sax.EntityResolver
    An EntityResolver that rejects all entities except for a given DTD. This DTD is resolved against a resource.
    • Constructor Summary

      Constructors 
      Constructor Description
      FixedDtdEntityResolver​(@NotNull java.lang.String systemId, @NotNull java.lang.String resourceName)
      Creates a new instance.
    • Method Summary

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

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

      • FixedDtdEntityResolver

        public FixedDtdEntityResolver​(@NotNull
                                      @NotNull java.lang.String systemId,
                                      @NotNull
                                      @NotNull java.lang.String resourceName)
        Creates a new instance.
        Parameters:
        systemId - the expected system ID
        resourceName - the name of the resource to return for systemId
    • Method Detail

      • resolveEntity

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