public static int readInt(ByteBuffer buf, int pos) {
    return (((buf.get(pos) & 0xff) << 24) | ((buf.get(pos + 1) & 0xff) << 16)
        | ((buf.get(pos + 2) & 0xff) << 8) | (buf.get(pos + 3) & 0xff));
  }
public static int readInt ( ByteBuffer buf , int pos ) { return ( ( ( buf . get ( pos ) & 0xff ) << 24 ) | ( ( buf . get ( pos + 1 ) & 0xff ) << 16 ) | ( ( buf . get ( pos + 2 ) & 0xff ) << 8 ) | ( buf . get ( pos + 3 ) & 0xff ) ) ; }
Reads a specific integer byte value (4 bytes) from the input byte buffer at the given offset.

@param buf input byte buffer
@param pos offset into the byte buffer to read
@return the int value read