@Override
    public boolean dumpImageFile(final PrintWriter pw, final ByteSource byteSource) throws ImagingException, IOException {
        try {
            pw.println("tiff.dumpImageFile");

            {
                final ImageInfo imageData = getImageInfo(byteSource);
                if (imageData == null) {
                    return false;
                }

                imageData.toString(pw, "");
            }

            pw.println("");

            // try
            {
                final FormatCompliance formatCompliance = FormatCompliance.getDefault();
                final TiffImagingParameters params = new TiffImagingParameters();
                final TiffContents contents = new TiffReader(true).readContents(byteSource, params, formatCompliance);

                final List<TiffDirectory> directories = contents.directories;
                if (directories == null) {
                    return false;
                }

                for (int d = 0; d < directories.size(); d++) {
                    final TiffDirectory directory = directories.get(d);

                    // Debug.debug("directory offset", directory.offset);

                    for (final TiffField field : directory) {
                        field.dump(pw, Integer.toString(d));
                    }
                }

                pw.println("");
            }
            // catch (Exception e)
            // {
            // Debug.debug(e);
            // pw.println("");
            // return false;
            // }

            return true;
        } finally {
            pw.println("");
        }
    }
Constructs a new instance with the big-endian byte order.
src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java