for (int index = 0; index < values.length; index++) {
Object value = values[index];
if (value instanceof BigInteger) {
writer.writeBigInteger((BigInteger) value);
} else if (value instanceof Integer) {
writer.writeInt(((Integer) value).intValue());
} else if (value instanceof Long) {
writer.writeUINT64(((Long) value).longValue());
} else if (value instanceof Short) {
writer.writeShort(((Short) value).shortValue());
} else if (value instanceof Boolean) {