code: private static int get4ByteLittleEndian(byte[] buf, int pos) {
          return (buf[pos] & 0xFF) + ((buf[pos + 1] & 0xFF) << 8) +
                  ((buf[pos + 2] & 0xFF) << 16) + ((buf[pos + 3] & 0xFF) << 24);
      }
docs: return the 4 bytes buf[i..i+3] as an integer in little endian format.