private IWORKDocumentType detectType(InputStream entryStream, int markLimit) throws IOException {
        byte[] bytes = new byte[markLimit];
        try {
            int read = IOUtils.read(entryStream, bytes, 0, markLimit);
            try (InputStream bis = UnsynchronizedByteArrayInputStream.builder().setByteArray(bytes)
                    .setOffset(0).setLength(read).get()) {
                return IWORKDocumentType.detectType(bis);
            }
        } catch (UnsupportedZipFeatureException e) {
            // There was a problem with extracting the root type
            // Password Protected iWorks files are funny, but we can usually
            //  spot them because they encrypt part of the zip stream

            // Compression field was likely encrypted
            return IWORKDocumentType.ENCRYPTED;
        }

    }
This parser handles all iWorks formats.
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-apple-module/src/main/java/org/apache/tika/parser/iwork/IWorkPackageParser.java