public String parseXmpJpegSegment(final byte[] segmentData) throws ImagingException {
        if (!isXmpJpegSegment(segmentData)) {
            throw new ImagingException("Invalid JPEG XMP Segment.");
        }
        final int index = JpegConstants.XMP_IDENTIFIER.size();

        // segment data is UTF-8 encoded xml.
        return new String(segmentData, index, segmentData.length - index, StandardCharsets.UTF_8);
    }
Constructs a new instance with the default, big-endian, byte order.
src/main/java/org/apache/commons/imaging/formats/jpeg/xmp/JpegXmpParser.java