@Override
	public byte readByte(long index) throws IOException {
		if (index < 0 || index > Integer.MAX_VALUE) {
			throw new IOException("index out of range");
		}
		try {
			return buffer.getByte((int) index);
		}
		catch (MemoryAccessException e) {
			throw new IOException("index out of range");
		}
	}
Return maximum length since actual length is unknown
@return maximum possible length
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/MemBufferByteProvider.java