private void ensureBounds(long index, long count) throws IOException {
		if (index < 0 || index > length) {
			throw new IOException("Invalid index: " + index);
		}
		if (index + count > length) {
			throw new IOException("Unable to read past EOF: " + index + ", " + count);
		}
	}
Read bytes at the specified index into the given byte array.
<p>
See {@link InputStream#read(byte[], int, int)}.

@param index file offset to start reading
@param buffer byte array that will receive the bytes
@param offset offset inside the byte array to place the bytes
@param len number of bytes to read
@return number of actual bytes read
@throws IOException if error
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/RangeMappedByteProvider.java