throw new Parser.Failure(e.getMessage(), location);
}
ii = parseJavaImage(location, new ByteArrayInputStream(b));
JpegSegmentReader segmentReader;
try {
segmentReader = new JpegSegmentReader(new ByteArrayInputStream(b));
final byte[] exifSegment = segmentReader.readSegment(JpegSegmentReader.SEGMENT_APP1);
final byte[] iptcSegment = segmentReader.readSegment(JpegSegmentReader.SEGMENT_APPD);
final Metadata metadata = new Metadata();
new ExifReader(exifSegment).extract(metadata);
new IptcReader(iptcSegment).extract(metadata);
@SuppressWarnings("unchecked")