for (int j = 0; j < oldFieldTags.size(); j++)
{
Integer fieldTag = (Integer) oldFieldTags.get(j);
TiffField oldField = (TiffField) oldFieldMap.get(fieldTag);
TiffField newField = (TiffField) newFieldMap.get(fieldTag);
// Debug.debug("fieldTag", fieldTag);
// Debug.debug("oldField", oldField);
// Debug.debug("newField", newField);
// fieldTag.
assertNotNull(oldField);
assertNotNull(newField);
assertEquals(oldField.tag, newField.tag);
assertEquals(dirType.intValue(), newField.directoryType);
assertEquals(oldField.directoryType, newField.directoryType);
assertEquals(oldField.length, newField.length);
assertEquals(oldField.isLocalValue(), newField.isLocalValue());
if (oldField.tag == 0x202)
{
// ignore "jpg from raw length" value. may have off-by-one bug in certain cameras.
// i.e. Sony DCR-PC110
continue;
}
if (!oldField.tagInfo.isOffset())
{
if (oldField.tagInfo.isText())
;
else if (oldField.isLocalValue())
{
// Debug.debug("oldField.tag", oldField.tag);
// Debug.debug("newField.tag", newField.tag);
// Debug.debug("oldField.tagInfo", oldField.tagInfo);
// Debug.debug("newField.tagInfo", newField.tagInfo);
// Debug.debug("oldField.fieldType", oldField.fieldType);
// Debug.debug("newField.fieldType", newField.fieldType);
// Debug.debug("oldField.getBytesLength", oldField
// .getBytesLength());
// Debug.debug("newField.getBytesLength", newField
// .getBytesLength());
//
// Debug.debug("oldField.valueOffsetBytes",
// oldField.valueOffsetBytes);
// Debug.debug("newField.valueOffsetBytes",
// newField.valueOffsetBytes);
if (oldField.tag == 0x116 || oldField.tag == 0x117)
compare(oldField, newField);
else
compare(oldField.valueOffsetBytes,
newField.valueOffsetBytes, oldField
.getBytesLength(), newField
.getBytesLength());
}
else
{
// Debug.debug("oldField.tagInfo", oldField.tagInfo);