Impl variable length binary struct. Data will now be shifted to the correct possitions

This commit is contained in:
Ziver Koc 2016-05-11 17:11:18 +02:00
parent bae988e8dd
commit 3f21caa35b
7 changed files with 77 additions and 45 deletions

View file

@ -95,7 +95,7 @@ public class BinaryFieldData {
else if (field.getType() == Integer.class || field.getType() == int.class)
field.set(obj, Converter.toInt(data));
else if (field.getType() == String.class)
field.set(obj, new String(data, StandardCharsets.ISO_8859_1));
field.set(obj, new String(ByteUtil.getReverseByteOrder(data), StandardCharsets.ISO_8859_1));
else
throw new UnsupportedOperationException("Unsupported BinaryStruct field class: "+ field.getClass());
} catch (IllegalAccessException e){