@Override
        public void parseEmbedded(TikaInputStream tis, ContentHandler contentHandler, Metadata metadata, boolean outputHtml) throws SAXException, IOException {

            MediaType contentType = detector.detect(tis, metadata);

            String name = metadata.get(TikaCoreProperties.RESOURCE_NAME_KEY);
            File outputFile = null;
            if (name == null) {
                name = "file" + count++;
            }
            outputFile = getOutputFile(name, metadata, contentType);


            File parent = outputFile.getParentFile();
            if (!parent.exists()) {
                if (!parent.mkdirs()) {
                    throw new IOException("unable to create directory \"" + parent + "\"");
                }
            }
            System.out.println("Extracting '" + name + "' (" + contentType + ") to " + outputFile);

            try (FileOutputStream os = new FileOutputStream(outputFile)) {
                if (embeddedStreamTranslator.shouldTranslate(tis, metadata)) {
                    try (InputStream translated = embeddedStreamTranslator.translate(tis, metadata)) {
                        IOUtils.copy(translated, os);
                    }
                } else {
                    IOUtils.copy(tis, os);
                }
            } catch (Exception e) {
                //
                // being a CLI program messages should go to the stderr too
                //
                String msg = String.format(Locale.ROOT, "Ignoring unexpected exception trying to save embedded file %s (%s)", name, e.getMessage());
                LOG.warn(msg, e);
            }
        }
Outputs the Tika metadata as XMP using the Tika XMP module
tika-app/src/main/java/org/apache/tika/cli/TikaCLI.java