public static Integer getIntUnsignedNullable(ByteBuffer in)
    {
        int a = in.get() & 0xFF;

        if (a == NULL) 
        {
            return null;
        }
        
        int value = (a & 0x3f);
        int shift = -1;
        
        while ((a & BYTE_MORE) != 0)
        {
            a = in.get() & 0xFF;
            value |= (a & 0x7F) << (shift += 7);
        }
        
        return value;
    }