public static int readVInt(ByteData arr, long position) {
    """
	Read a variable length integer from the supplied {@link ByteData} starting at the specified position.
	@param arr the byte data to read from
	@param position the position in the byte data to read from
	@return the int value
    """
        byte b = arr.get(position++);

        if(b == (byte) 0x80)
            throw new RuntimeException("Attempting to read null value as int");

        int value = b & 0x7F;
        while ((b & 0x80) != 0) {
          b = arr.get(position++);
          value <<= 7;
          value |= (b & 0x7F);
        }

        return value;
    }
public static int readVInt(ByteData arr, long position) {
        byte b = arr.get(position++);

        if(b == (byte) 0x80)
            throw new RuntimeException("Attempting to read null value as int");

        int value = b & 0x7F;
        while ((b & 0x80) != 0) {
          b = arr.get(position++);
          value <<= 7;
          value |= (b & 0x7F);
        }

        return value;
    }
public static int readVInt ( ByteData arr , long position ) { byte b = arr . get ( position ++ ) ; if ( b == ( byte ) 0x80 ) throw new RuntimeException ( "Attempting to read null value as int" ) ; int value = b & 0x7F ; while ( ( b & 0x80 ) != 0 ) { b = arr . get ( position ++ ) ; value <<= 7 ; value |= ( b & 0x7F ) ; } return value ; }
Read a variable length integer from the supplied {@link ByteData} starting at the specified position.
@param arr the byte data to read from
@param position the position in the byte data to read from
@return the int value
Read a variable length integer from the supplied {