public TiffField findField(final TagInfo tag, final boolean failIfMissing) throws ImagingException {
        for (final TiffField field : entries) {
            if (field.getTag() == tag.tag) {
                return field;
            }
        }

        if (failIfMissing) {
            throw new ImagingException("Missing expected field: " + tag.getDescription());
        }

        return null;
    }
Preserves the byte order derived from the TIFF file header. Some of the legacy methods in this class require byte order as an argument, though that use
could be phased out eventually.
src/main/java/org/apache/commons/imaging/formats/tiff/TiffDirectory.java