public int readNextVarInt(InputStreamReaderFunction<Long> func)
			throws IOException, InvalidDataException {
		long value = func.get(getInputStream());
		ensureInt32s(value);
		return (int) value;
	}
Reads a variable length / unknown format integer from the current position, using the
supplied reader function, returning it (if it fits) as a 32 bit java integer.

@param func {@link InputStreamReaderFunction}
@return signed int32
@throws IOException if error reading or if the value does not fit into a 32 bit java int
@throws InvalidDataException if value can not be held in a java integer
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/BinaryReader.java