public static void set(Object target, Field field, byte[] bytes)
    {
        PropertyAccessor<?> accessor = PropertyAccessorFactory.getPropertyAccessor(field);
        Object value = accessor.fromBytes(field.getType(), bytes);
        set(target, field, value);
    }
public static void set ( Object target , Field field , byte [ ] bytes ) { PropertyAccessor < ? > accessor = PropertyAccessorFactory . getPropertyAccessor ( field ) ; Object value = accessor . fromBytes ( field . getType ( ) , bytes ) ; set ( target , field , value ) ; }
Sets a byte-array onto a field.

@param target
the target
@param field
the field
@param bytes
the bytes

@throws PropertyAccessException
the property access exception