Class ZipArchiveXMLMagicNumber

    • Constructor Detail

      • ZipArchiveXMLMagicNumber

        public ZipArchiveXMLMagicNumber​(javax.activation.MimeType mimeType,
                                        String formatVersion,
                                        File innerFile,
                                        String rootNode)
        Constructor.
        Parameters:
        mimeType - is the MIME type associated to this magic number.
        formatVersion - is the version of the supported format.
        innerFile - is the file to open from the inside of the Zip archive to test the type. The filename is relative to the root of the zip file content.
        rootNode - is the name of the XML root node from which XLS information may be extracted.
      • ZipArchiveXMLMagicNumber

        public ZipArchiveXMLMagicNumber​(javax.activation.MimeType mimeType,
                                        File innerFile,
                                        String rootNode)
        Constructor.
        Parameters:
        mimeType - is the MIME type associated to this magic number.
        innerFile - is the file to open from the inside of the Zip archive to test the type. The filename is relative to the root of the zip file content.
        rootNode - is the name of the XML root node from which XLS information may be extracted.
    • Method Detail

      • isContentType

        protected final boolean isContentType​(ZipInputStream zipStream,
                                              ZipEntry zipEntry,
                                              InputStream zipEntryStream)
        Description copied from class: ZipArchiveMagicNumber
        Replies if the specified stream contains data that corresponds to this magic number.
        Specified by:
        isContentType in class ZipArchiveMagicNumber
        Parameters:
        zipStream - is the stream of the Zip archive
        zipEntry - is the zip entry that is corresponding to the innerFile given as parameter of the constructor, or null not significant.
        zipEntryStream - is the stream on the data of the given zip entry, or null not significant.
        Returns:
        true if the stream is containing this magic number, otherwise false
      • isContentType

        protected abstract boolean isContentType​(String schemaId,
                                                 String schemaVersion,
                                                 String systemId,
                                                 String publicId)
        Replies if the specified stream contains data that corresponds to this magic number.
        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