public RationalNumber getFieldValue(final TagInfoSRational tag) throws ImagingException {
        final TiffField field = findField(tag);
        if (field == null) {
            throw new ImagingException("Required field \"" + tag.name + "\" is missing");
        }
        if (!tag.dataTypes.contains(field.getFieldType())) {
            throw new ImagingException("Required field \"" + tag.name + "\" has incorrect type " + field.getFieldType().getName());
        }
        if (field.getCount() != 1) {
            throw new ImagingException("Field \"" + tag.name + "\" has wrong count " + field.getCount());
        }
        final byte[] bytes = field.getByteArrayValue();
        return tag.getValue(field.getByteOrder(), bytes);
    }
Gets the byte order used by the source file for storing this directory and its content.

@return A valid byte order instance.
src/main/java/org/apache/commons/imaging/formats/tiff/TiffDirectory.java