code: private int s2i(final byte[] bytes) {
      int num = 0;
      for (int i = 0; i < 4; i++) {
        num += (bytes[i] & 0xff) << ((3 - i) * 8);
      }
      return num;
    }
docs: Read four bytes off the provided byte string and return the value as a big endian
  32 bit unsigned integer.
  @param bytes Array of bytes.
  @return int