*/
public static long getUInt(byte[] data, int offset) {
long retNum = getInt(data, offset);
- return retNum & 0x00FFFFFFFF;
+ return retNum & 0x00FFFFFFFFl;
}
/**
*/
public static long getLong(byte[] data, int offset) {
long result = 0;
-
+
for (int j = offset + LONG_SIZE - 1; j >= offset; j--) {
result <<= 8;
result |= 0xff & data[j];
public static void putLong(byte[] data, int offset, long value) {
int limit = LONG_SIZE + offset;
long v = value;
-
+
for (int j = offset; j < limit; j++) {
data[j] = (byte) (v & 0xFF);
v >>= 8;
}
return (ch2 << 8) + (ch1 << 0);
}
-
+
/**
* get an int value from an InputStream
if ((ch1 | ch2 | ch3 | ch4 | ch5 | ch6 | ch7 | ch8) < 0) {
throw new BufferUnderrunException();
}
-
- return
+
+ return
((long)ch8 << 56) +
((long)ch7 << 48) +
((long)ch6 << 40) +