Class DtdJarResolver

  • All Implemented Interfaces:
    EntityResolver

    public class DtdJarResolver
    extends Object
    implements EntityResolver
    The DdtJarResolver allows the SAX parser to resolve DTD's stored in a JAR file.
    Author:
    Marcus Portmann
    • Constructor Detail

      • DtdJarResolver

        public DtdJarResolver​(String systemId,
                              String dtdPath)
        Constructs a new DTDJarResolver.
        Parameters:
        systemId - the system ID for the DTD
        dtdPath - the path on the classpath to the DTD
      • DtdJarResolver

        public DtdJarResolver​(String publicId,
                              String systemId,
                              String dtdPath)
        Constructs a new DTDJarResolver.
        Parameters:
        publicId - the public ID for the DTD
        systemId - the system ID for the DTD
        dtdPath - the path on the classpath to the DTD
    • Method Detail

      • getPublicId

        public String getPublicId()
        Returns the public ID for the DTD.
        Returns:
        the public ID for the DTD
      • getSystemId

        public String getSystemId()
        Returns the system ID for the DTD.
        Returns:
        the system ID for the DTD
      • resolveEntity

        public InputSource resolveEntity​(String publicId,
                                         String systemId)
        Resolve the XML entity with the specified public ID and system ID. This method returns an InputSource that can be used to read the data for the DTD.
        Specified by:
        resolveEntity in interface EntityResolver
        Parameters:
        publicId - the public ID for the DTD
        systemId - the system ID for the DTD
        Returns:
        an InputSource that can be used to read the data for the DTD