@Override
    public byte[] writeData(final Object o, final ByteOrder byteOrder) throws ImagingException {
        if (o instanceof Integer) {
            return ByteConversions.toBytes((Integer) o, byteOrder);
        }
        if (o instanceof int[]) {
            final int[] numbers = (int[]) o;
            return ByteConversions.toBytes(numbers, byteOrder);
        }
        if (!(o instanceof Integer[])) {
            throw new ImagingException("Invalid data", o);
        }
        final Integer[] numbers = (Integer[]) o;
        final int[] values = Allocator.intArray(numbers.length);
        System.arraycopy(numbers, 0, values, 0, values.length);
        return ByteConversions.toBytes(values, byteOrder);
    }
Gets the value(s) for this field in the form of an array of long integers.

@param entry the TIFF field as obtained from the source file.
@return a valid, potentially empty array of Java long integers.
src/main/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeLong8.java