@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);
        }
        XHTMLContentHandler xhtml = new XHTMLContentHandler(handler, metadata);
        xhtml.startDocument();

        MediaType type = null;
        if (zipFile != null) {
            type = processZipFile(zipFile, metadata, xhtml, context);
        } else if (zipStream != null) {
            type = processZipStream(zipStream, metadata, xhtml, context);
        }
        if (type != null) {
            if (type == IWork13DocumentType.UNKNOWN13.getType()) {
                type = guessTypeByExtension(metadata);
            }
            metadata.set(Metadata.CONTENT_TYPE, type.toString());
        }
        xhtml.endDocument();

    }
All iWork 13 files contain this, so we can detect based on it
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-apple-module/src/main/java/org/apache/tika/parser/iwork/iwana/IWork13PackageParser.java