@Override
	public byte getByte(int offset) throws MemoryAccessException {
		if ((offset >= minOffset) && (offset <= maxOffset)) {
			return buffer[startAddrIndex + offset];
		}
		try {
			Address addr = startAddr.addNoWrap(offset);

			int nRead = mem.getBytes(addr, buffer, 0, buffer.length);

			startAddrIndex = -offset;
			minOffset = offset;
			maxOffset = offset + nRead - 1;

			return buffer[0];
		}
		catch (AddressOverflowException e) {
			throw new MemoryAccessException(e.getMessage());
		}
	}
Construct a new MemoryBufferImpl
@param mem memory associated with the given address
@param addr start address
@param bufSize the size of the memory buffer.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/mem/MemoryBufferImpl.java