@Override
    public String toString(String prefix) {
        if (prefix == null) {
            prefix = "";
        }

        final StringBuilder result = new StringBuilder();

        result.append(prefix);
        if (null == exif) {
            result.append("No Exif metadata.");
        } else {
            result.append("Exif metadata:");
            result.append(NEWLINE);
            result.append(exif.toString("\t"));
        }

        // if (null != exif && null != photoshop)
        result.append(NEWLINE);

        result.append(prefix);
        if (null == photoshop) {
            result.append("No Photoshop (IPTC) metadata.");
        } else {
            result.append("Photoshop (IPTC) metadata:");
            result.append(NEWLINE);
            result.append(photoshop.toString("\t"));
        }

        return result.toString();
    }
Returns the size of the first JPEG thumbnail found in the EXIF metadata.

@return Thumbnail width and height or null if no thumbnail.
@throws ImagingException if it fails to read the image
@throws IOException      if it fails to read the image size
src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImageMetadata.java