}
// Loop through all APPE segments, checking the leading bytes to identify the format of each.
for (byte[] appeSegment : segmentReader.getSegments(JpegSegmentReader.SEGMENT_APPE)) {
if (appeSegment.length == 12 && "Adobe".compareTo(new String(appeSegment, 0, 5))==0) {
new AdobeJpegReader().extract(new ByteArrayReader(appeSegment), metadata);
}
}
return metadata;
}