protected void handleXMP(InputStream stream, int xmpLength, ImageMetadataExtractor extractor)
            throws IOException, TikaException, SAXException {
        if (xmpLength < 0) {
            throw new TikaException("xmp length must be >= 0");
        }
        if (xmpLength > maxRecordLength) {
            throw new TikaMemoryLimitException("xmplength (" + xmpLength + " bytes) is larger than maxXMPLength (" +
                    maxRecordLength + "). Consider setting maxXMPLength to a greater value for " +
                    "this parser via" +
                    " tika-config.xml if this file is not corrupt.");
        }
        byte[] xmp = new byte[xmpLength];
        IOUtils.readFully(stream, xmp);
        extractor.parseRawXMP(xmp);
    }
Parser for the Better Portable Graphics (BPG) File Format.
<p/>
Documentation on the file format is available from
http://bellard.org/bpg/bpg_spec.txt
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-image-module/src/main/java/org/apache/tika/parser/image/BPGParser.java