some refactoring and bugfixes
This commit is contained in:
parent
4d31e66ebd
commit
63f191db4c
4 changed files with 56 additions and 17 deletions
|
|
@ -57,7 +57,7 @@ public class BinaryStructParser {
|
|||
int readLength = 0;
|
||||
byte[] valueData = new byte[(int) Math.ceil(length / 8.0)];
|
||||
for (int index = 0; index < valueData.length; ++index) {
|
||||
valueData[index] = ByteUtil.getBits(data[byteIndex], bitIndex, bitLength);
|
||||
valueData[index] = ByteUtil.getShiftedBits(data[byteIndex], bitIndex, bitLength);
|
||||
readLength += bitLength;
|
||||
byteIndex++;
|
||||
bitIndex = 7;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue