new JpegCommentReader().extract(new ByteArrayReader(comSegment), metadata);
// Loop through all APP1 segments, checking the leading bytes to identify the format of each.
for (byte[] app1Segment : segmentReader.getSegments(JpegSegmentReader.SEGMENT_APP1)) {
if (app1Segment.length > 3 && "EXIF".equalsIgnoreCase(new String(app1Segment, 0, 4)))
new ExifReader().extract(new ByteArrayReader(app1Segment), metadata);
//if (app1Segment.length > 27 && "http://ns.adobe.com/xap/1.0/".equalsIgnoreCase(new String(app1Segment, 0, 28)))
// new XmpReader().extract(new ByteArrayReader(app1Segment), metadata);
}