private void handleOLENative(DirectoryEntry dir, POIFSDocumentType type, String rName,
                                 Metadata metadata, XHTMLContentHandler xhtml, boolean outputHtml)
            throws IOException, SAXException {
        byte[] data = null;
        try {
            // Try to un-wrap the OLE10Native record:
            Ole10Native ole = Ole10Native.createFromEmbeddedOleObject((DirectoryNode) dir);
            if (ole.getLabel() != null) {
                metadata.set(TikaCoreProperties.RESOURCE_NAME_KEY, rName + '/' + ole.getLabel());
            } else {
                metadata.add(TikaCoreProperties.RESOURCE_NAME_KEY, rName);
            }
            if (ole.getCommand() != null) {
                metadata.add(TikaCoreProperties.ORIGINAL_RESOURCE_NAME, ole.getCommand());
            }
            if (ole.getFileName() != null) {
                metadata.add(TikaCoreProperties.ORIGINAL_RESOURCE_NAME, ole.getFileName());
            }
            data = ole.getDataBuffer();
            metadata.set(Metadata.CONTENT_LENGTH, Integer.toString(data.length));
        } catch (Ole10NativeException ex) {
            // Not a valid OLE10Native record, skip it
        } catch (SecurityException e) {
            throw e;
        } catch (Exception e) {
            EmbeddedDocumentUtil.recordEmbeddedStreamException(e, parentMetadata);
            return;
        }
        try (TikaInputStream tis = TikaInputStream.get(data)) {
            parseEmbedded(dir, tis, xhtml, metadata, outputHtml);
        }
    }
Handle an office document that's embedded at the POIFS level
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/AbstractPOIFSExtractor.java