@Override
	public int getBytes(long offsetInMemBlock, byte[] b, int off, int len)
			throws IndexOutOfBoundsException, IOException {
		long offsetInSubBlock = offsetInMemBlock - subBlockOffset;
		long available = subBlockLength - offsetInSubBlock;
		len = (int) Math.min(len, available);
		buf.get((int) offsetInSubBlock, b, off, len);
		return len;
	}
Implementation of SubMemoryBlock for blocks that store bytes in their own private database
buffers
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/mem/BufferSubMemoryBlock.java