@Override
	public long length() throws IOException {
		if (isEmtpy) {
			return 0;
		}

		// clamp the max length to Long.MAX_VALUE
		return Long.compareUnsigned(maxOffset, Long.MAX_VALUE - 1) >= 0
				? Long.MAX_VALUE
				: maxOffset + 1;
	}
Returns the address range of the bytes of this provider.

@return address range of first byte to last byte of this provider
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/MemoryByteProvider.java