if ((segments == null) || (segments.isEmpty())) {
return null;
}
PhotoshopApp13Data photoshopApp13Data = null;
for (Segment s : segments) {
final App13Segment segment = (App13Segment) s;
final PhotoshopApp13Data data = segment.parsePhotoshopSegment(params);
if (data != null && photoshopApp13Data != null) {
throw new ImageReadException(
"Jpeg contains more than one Photoshop App13 segment.");
}