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);
    }
public int readUnsignedInt ( ) { int variableByteDecode = 0 ; byte variableByteShift = 0 ; while ( ( this . bufferData [ this . bufferPosition ] & 0x80 ) != 0 ) { variableByteDecode |= ( this . bufferData [ this . bufferPosition ++ ] & 0x7f ) << variableByteShift ; variableByteShift += 7 ; } return variableByteDecode | ( this . bufferData [ this . bufferPosition ++ ] << variableByteShift ) ; }
Converts a variable amount of bytes from the read buffer to an unsigned int.
<p/>
The first bit is for continuation info, the other seven bits are for data.

@return the int value.