Class DTDBasedZippedXMLMagicNumber

  • All Implemented Interfaces:
    Comparable<MagicNumber>

    public class DTDBasedZippedXMLMagicNumber
    extends ZippedXMLMagicNumber
    This class defines a set of informations that could distinguish a file content from another one. It is also known as Magic Number on several operating systems.

    This magic number supports zipped XML files and permits to test the system and user Identifiers extracted from the XML content.

    Since:
    14.0
    Version:
    17.0 2020-01-04 14:41:40
    Author:
    Stéphane GALLAND
    Maven Group Id:
    org.arakhne.afc.core
    Maven Artifact Id:
    inputoutput
    • Constructor Detail

      • DTDBasedZippedXMLMagicNumber

        public DTDBasedZippedXMLMagicNumber​(javax.activation.MimeType mimeType,
                                            String systemId,
                                            String publicId)
        Constructor.
        Parameters:
        mimeType - is the MIME type associated to this magic number.
        systemId - is the DTD system ID associated to this magic number.
        publicId - is the DTD system ID associated to this magic number.
      • DTDBasedZippedXMLMagicNumber

        public DTDBasedZippedXMLMagicNumber​(javax.activation.MimeType mimeType,
                                            String formatVersion,
                                            String systemId,
                                            String publicId)
        Constructor.
        Parameters:
        mimeType - is the MIME type associated to this magic number.
        formatVersion - is the version of the supported format.
        systemId - is the DTD system ID associated to this magic number.
        publicId - is the DTD system ID associated to this magic number.
    • Method Detail

      • isContentType

        protected boolean isContentType​(String schemaId,
                                        String schemaVersion,
                                        String systemId,
                                        String publicId)
        Replies if the specified stream contains data that corresponds to this magic number.
        Specified by:
        isContentType in class ZippedXMLMagicNumber
        Parameters:
        schemaId - is the ID of the XSL schema associated to this magic number.
        schemaVersion - is the ID of the XSL schema associated to this magic number.
        systemId - is the DTD system ID associated to this magic number.
        publicId - is the DTD system ID associated to this magic number.
        Returns:
        true if this magic number is corresponding to the given XML document, otherwise false.