@Override
    public void parse(InputStream stream, ContentHandler handler, Metadata metadata,
                      ParseContext context) throws IOException, SAXException, TikaException {
        // Open the Zip stream
        // Use a File if we can, and an already open zip is even better
        ZipFile zipFile = null;
        ZipInputStream zipStream = null;
        if (stream instanceof TikaInputStream) {
            TikaInputStream tis = (TikaInputStream) stream;
            Object container = ((TikaInputStream) stream).getOpenContainer();
            if (container instanceof ZipFile) {
                zipFile = (ZipFile) container;
            } else if (tis.hasFile()) {
                zipFile = ZipFile.builder().setFile(tis.getFile()).get();
            } else {
                zipStream = new ZipInputStream(stream);
            }
        } else {
            zipStream = new ZipInputStream(stream);
        }

        // For now, just detect
        MediaType type = null;
        if (zipFile != null) {
            Enumeration<? extends ZipEntry> entries = zipFile.getEntries();
            while (entries.hasMoreElements()) {
                ZipEntry entry = entries.nextElement();
                if (type == null) {
                    type = IWork18DocumentType.detectIfPossible(entry);
                }
            }
        } else {
            ZipEntry entry = zipStream.getNextEntry();
            while (entry != null) {
                if (type == null) {
                    type = IWork18DocumentType.detectIfPossible(entry);
                }
                entry = zipStream.getNextEntry();
            }
        }
        if (type != null) {
            metadata.add(Metadata.CONTENT_TYPE, type.toString());
        }
    }
For now, this parser isn't even registered.  It contains
code that will detect the newer 2018 .keynote, .numbers, .pages files.
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-apple-module/src/main/java/org/apache/tika/parser/iwork/iwana/IWork18PackageParser.java