Ejemplo n.º 1
0
 @Override
 public Object toObject(Pointer<?> value, int size) throws InvalidAttributeException {
   switch (size) {
     case 1:
       return value.getByte();
     case 2:
       return value.getShort();
     case 4:
       return value.getInt();
     case 8:
       return value.getLong();
   }
   throw new InvalidAttributeException("Invalid size for int : " + size);
 }