EXIF_FIELD_SIZE[ EXIF_FIELD_TYPE_SRATIONAL ];
final int longSize = EXIF_FIELD_SIZE[ EXIF_FIELD_TYPE_SLONG ];
for ( int i = 0; i < numValues; ++i )
try {
final int pos = offset + i * valueSize;
values[i] = new Rational(
m_buf.getInt( pos ), m_buf.getInt( pos + longSize )
);
}
catch ( IllegalArgumentException e ) {
m_handler.gotBadMetadata( e );
return null;
}
return new RationalMetaValue( values );
}
case EXIF_FIELD_TYPE_URATIONAL: {
final Rational[] values = new Rational[ numValues ];
final int valueSize =
EXIF_FIELD_SIZE[ EXIF_FIELD_TYPE_URATIONAL ];
final int longSize = EXIF_FIELD_SIZE[ EXIF_FIELD_TYPE_ULONG ];
for ( int i = 0; i < numValues; ++i )
try {
final int pos = offset + i * valueSize;
values[i] = new Rational(
m_buf.getInt( pos ), m_buf.getInt( pos + longSize )
);
}
catch ( IllegalArgumentException e ) {
m_handler.gotBadMetadata( e );