Object result = null;
if (offset) {
Element tiffElement = null;
switch (type) {
case 0x01:
tiffElement = new IntegerElement(1, (int) length,
bigEndian, IntegerElement.DECIMAL_FORMAT);
break;
case 0x02:
tiffElement = new FixedLengthStringElement(length, true);
break;
case 0x03:
tiffElement = new IntegerElement(2, (int) length,
bigEndian, IntegerElement.DECIMAL_FORMAT);
break;
case 0x04:
tiffElement = new IntegerElement(4, (int) length,
bigEndian, IntegerElement.DECIMAL_FORMAT);
break;
case 0x05:
tiffElement = new RationalElement(bigEndian);
break;
case 0x06:
tiffElement = new IntegerElement(1, (int) length,
bigEndian, IntegerElement.DECIMAL_FORMAT);
break;
case 0x07:
tiffElement = new ConstantElement("Manufacturer Defn");
break;
case 0x08:
tiffElement = new IntegerElement(2, (int) length,
bigEndian, IntegerElement.DECIMAL_FORMAT);
break;
case 0x09:
tiffElement = new IntegerElement(4, (int) length,
bigEndian, IntegerElement.DECIMAL_FORMAT);
break;
case 0x10:
tiffElement = new RationalElement();
break;