@Override
	public int getBytes(byte[] b, int offset) {
		if (offset >= minOffset && (b.length + offset) <= maxOffset) {
			System.arraycopy(buffer, startAddrIndex + offset, b, 0, b.length);
			return b.length;
		}
		try {
			return mem.getBytes(startAddr.addNoWrap(offset), b);
		}
		catch (AddressOverflowException | MemoryAccessException e) {
			return 0;
		}
	}
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