} 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) {
writer.writeBoolean(((Boolean) value).booleanValue());
} else if (value instanceof Date) {
writer.writeUINT64(((Date) value).getTime());
} else {