mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-11-29 11:49:29 +00:00
removed getWordBigEndian
This commit is contained in:
parent
3bd836a828
commit
fe2df5247c
@ -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);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user