code: public static int readInt(byte[] buf, int pos) {
      checkBoundary(buf, pos, 4);
      return (((buf[pos++] & 0xff) << 24) | ((buf[pos++] & 0xff) << 16)
          | ((buf[pos++] & 0xff) << 8) | (buf[pos] & 0xff));
    }
docs: Reads a specific integer byte value (4 bytes) from the input byte array at the given offset.
  
  @param buf input byte array
  @param pos offset into the byte buffer to read
  @return the int value read