removed getWordBigEndian

This commit is contained in:
Denis Molony 2021-05-14 12:23:01 +10:00
parent 3bd836a828
commit fe2df5247c
2 changed files with 12 additions and 12 deletions

View File

@ -31,7 +31,7 @@ public class PrefixDiskCopy
tagChecksum = Utility.getLongBigEndian (buffer, 0x4C);
diskFormat = buffer[0x50] & 0xFF;
format = buffer[0x51] & 0xFF;
id = Utility.getWordBigEndian (buffer, 0x52);
id = Utility.getShortBigEndian (buffer, 0x52);
}
// ---------------------------------------------------------------------------------//

View File

@ -153,17 +153,17 @@ public final class Utility
}
// ---------------------------------------------------------------------------------//
public static int getWordBigEndian (byte[] buffer, int ptr)
// ---------------------------------------------------------------------------------//
{
int val = 0;
for (int i = 0; i < 2; i++)
{
val <<= 8;
val += buffer[ptr + i] & 0xFF;
}
return val;
}
// public static int getWordBigEndian (byte[] buffer, int ptr)
// // ---------------------------------------------------------------------------------//
// {
// int val = 0;
// for (int i = 0; i < 2; i++)
// {
// val <<= 8;
// val += buffer[ptr + i] & 0xFF;
// }
// return val;
// }
// ---------------------------------------------------------------------------------//
public static int unsignedShort (byte[] buffer, int ptr)