Return next 24-bit unsigned int from buffer. (big-endian)

@see mysql-5.6.10/include/myisampack.h - mi_usint3korr
500629
public final int getBeUint24() {
        if (position + 2 >= origin + limit) throw new IllegalArgumentException("limit excceed: "
                                                                               + (position - origin + 2));

        byte[] buf = buffer;
        return ((0xff & buf[position++]) << 16) | ((0xff & buf[position++]) << 8) | (0xff & buf[position++]);
    }
646283
public final static int readReverseInt(IoBuffer in) {
        int value = in.getInt();
        value = ((value & 0xFF) << 24 | ((value >> 8) & 0x00FF) << 16 | ((value >>> 16) & 0x000000FF) << 8 | ((value >>> 24) & 0x000000FF));
        return value;
    }
47198
public static int buff2int(byte[] bs, int offset) {
        return ((bs[offset] >= 0 ? bs[offset] : 256 + bs[offset]) << 24)
                | ((bs[offset + 1] >= 0 ? bs[offset + 1] : 256 + bs[offset + 1]) << 16)
                | ((bs[offset + 2] >= 0 ? bs[offset + 2] : 256 + bs[offset + 2]) << 8)
                | (bs[offset + 3] >= 0 ? bs[offset + 3] : 256 + bs[offset + 3]);
    }
1352975
public final long getBeLong48() {
        if (position + 5 >= origin + limit) throw new IllegalArgumentException("limit excceed: "
                                                                               + (position - origin + 5));

        byte[] buf = buffer;
        return ((long) (buf[position++]) << 40) | ((long) (0xff & buf[position++]) << 32)
               | ((long) (0xff & buf[position++]) << 24) | ((long) (0xff & buf[position++]) << 16)
               | ((long) (0xff & buf[position++]) << 8) | ((long) (0xff & buf[position++]));
    }
463097
@Override
	protected int next(int nbits) {
		long x = this.seed;
		x ^= (x << 21);
		x ^= (x >>> 35);
		x ^= (x << 4);
		this.seed = x;
		x &= ((1L << nbits) - 1);
		return (int) x;
	}
279541
public static int takeInt(ByteBuffer buffer) {
        int val = 0;
        boolean started = false;
        boolean minus = false;
        int i;
        for (i = buffer.position(); i < buffer.limit(); i++) {
            byte b = buffer.get(i);
            if (b <= SPACE) {
                if (started)
                    break;
            } else if (b >= '0' && b <= '9') {
                val = val * 10 + (b - '0');
                started = true;
            } else if (b == MINUS && !started) {
                minus = true;
            } else
                break;
        }

        if (started) {
            buffer.position(i);
            return minus ? (-val) : val;
        }
        throw new NumberFormatException(toString(buffer));
    }
240159
public int readUnsignedInt() {
        int variableByteDecode = 0;
        byte variableByteShift = 0;

        // check if the continuation bit is set
        while ((this.bufferData[this.bufferPosition] & 0x80) != 0) {
            variableByteDecode |= (this.bufferData[this.bufferPosition++] & 0x7f) << variableByteShift;
            variableByteShift += 7;
        }

        // read the seven data bits from the last byte
        return variableByteDecode | (this.bufferData[this.bufferPosition++] << variableByteShift);
    }
1248654
public static int readInt(byte[] source, int position) {
        return (source[position] & 0xFF) << 24
                | (source[position + 1] & 0xFF) << 16
                | (source[position + 2] & 0xFF) << 8
                | (source[position + 3] & 0xFF);
    }
1029191
public static int readInt(byte[] bytes, int offset) {
        return (((bytes[offset + 0] & 0xff) << 24) | ((bytes[offset + 1] & 0xff) << 16)
                | ((bytes[offset + 2] & 0xff) << 8) | (bytes[offset + 3] & 0xff));
    }
1240994
def write_24bit_uint(self, n):
        
        if type(n) not in python.int_types:
            raise TypeError('expected an int (got:%r)' % (type(n),))

        if not 0 <= n <= 0xffffff:
            raise OverflowError("n is out of range")

        order = None

        if not self._is_big_endian():
            order = [0, 8, 16]
        else:
            order = [16, 8, 0]

        for x in order:
            self.write_uchar((n >> x) & 0xff)
1277947
static int getSignedInt(ByteBuf buf, int offset) {
        return (buf.getByte(offset)     & 0xFF) << 24 |
               (buf.getByte(offset + 1) & 0xFF) << 16 |
               (buf.getByte(offset + 2) & 0xFF) <<  8 |
                buf.getByte(offset + 3) & 0xFF;
    }
875641
public final int getInt16() {
        if (position + 1 >= origin + limit) throw new IllegalArgumentException("limit excceed: "
                                                                               + (position - origin + 1));

        byte[] buf = buffer;
        return (0xff & buf[position++]) | ((buf[position++]) << 8);
    }
14274
public final int getBeUint16(final int pos) {
        final int position = origin + pos;

        if (pos + 1 >= limit || pos < 0) throw new IllegalArgumentException("limit excceed: "
                                                                            + (pos < 0 ? pos : (pos + 1)));

        byte[] buf = buffer;
        return (0xff & buf[position + 1]) | ((0xff & buf[position]) << 8);
    }
1235243
public final long getBeUlong56(final int pos) {
        final int position = origin + pos;

        if (pos + 6 >= limit || pos < 0) throw new IllegalArgumentException("limit excceed: "
                                                                            + (pos < 0 ? pos : (pos + 6)));

        byte[] buf = buffer;
        return ((long) (0xff & buf[position + 6])) | ((long) (0xff & buf[position + 5]) << 8)
               | ((long) (0xff & buf[position + 4]) << 16) | ((long) (0xff & buf[position + 3]) << 24)
               | ((long) (0xff & buf[position + 2]) << 32) | ((long) (0xff & buf[position + 1]) << 40)
               | ((long) (0xff & buf[position]) << 48);
    }
434339
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));
  }
1023672
public final long getBeUlong48() {
        if (position + 5 >= origin + limit) throw new IllegalArgumentException("limit excceed: "
                                                                               + (position - origin + 5));

        byte[] buf = buffer;
        return ((long) (0xff & buf[position++]) << 40) | ((long) (0xff & buf[position++]) << 32)
               | ((long) (0xff & buf[position++]) << 24) | ((long) (0xff & buf[position++]) << 16)
               | ((long) (0xff & buf[position++]) << 8) | ((long) (0xff & buf[position++]));
    }
14136
public int readRawLittleEndian32() throws IOException
    {
        // final byte[] buffer = this.buffer;
        // int offset = this.offset;

        final byte[] bs = new byte[4];
        buffer.get(bs);

        // final byte b1 = buffer[offset++];
        // final byte b2 = buffer[offset++];
        // final byte b3 = buffer[offset++];
        // final byte b4 = buffer[offset++];
        //
        // this.offset = offset;

        return (((int) bs[0] & 0xff)) |
                (((int) bs[1] & 0xff) << 8) |
                (((int) bs[2] & 0xff) << 16) |
                (((int) bs[3] & 0xff) << 24);
    }