private void extractObj(byte[] bytes, ContentHandler handler, Metadata metadata)
            throws SAXException, IOException, TikaException {

        if (bytes == null) {
            return;
        }

        metadata.set(Metadata.CONTENT_LENGTH, Integer.toString(bytes.length));

        if (embeddedDocumentUtil.shouldParseEmbedded(metadata)) {
            TikaInputStream stream = TikaInputStream.get(bytes);
            if (metadata.get(TikaCoreProperties.RESOURCE_NAME_KEY) == null) {
                String extension = embeddedDocumentUtil.getExtension(stream, metadata);
                if (inObject && state == EMB_STATE.PICT) {
                    metadata.set(TikaCoreProperties.RESOURCE_NAME_KEY,
                            "thumbnail_" + thumbCount++ + extension);
                    metadata.set(RTFMetadata.THUMBNAIL, "true");
                } else {
                    metadata.set(TikaCoreProperties.RESOURCE_NAME_KEY,
                            "file_" + unknownFilenameCount.getAndIncrement() + extension);
                }
            }
            try {
                embeddedDocumentUtil
                        .parseEmbedded(stream, new EmbeddedContentHandler(handler), metadata,
                                true);
            } catch (IOException e) {
                EmbeddedDocumentUtil.recordEmbeddedStreamException(e, metadata);
            } finally {
                stream.close();
            }
        }
    }
Call this when the objdata/pict has completed

@throws IOException
@throws SAXException
@throws TikaException
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/rtf/RTFEmbObjHandler.java