if (obj.getClass().getComponentType().isPrimitive()) {
Serializer serializer = HashGenericRecordSerializers.getPrimitiveArraySerializer(obj.getClass().getComponentType());
if (serializer == null) {
throw new RuntimeException("Can't find serializer for array of type:" + obj.getClass());
}
serializer.serialize(hasher, obj);
} else {
Object[] objects = (Object[]) obj;
for (Object object : objects) {
write(object);
}