private byte getByte(DBBuffer[] buffers, long offset)
			throws IndexOutOfBoundsException, IOException {

		checkValid();

		if (offset < 0 || offset >= size) {
			throw new IndexOutOfBoundsException();
		}

		// The max buffer size will be the size of the first buffer. (If more than
		// one buffer exists, then the first buffer will be the true max size.  If only one buffer,
		// then its actual size can be used as the max size and it won't matter.)
		int maxBufferSize = buffers[0].length();

		int dbBufferIndex = (int) (offset / maxBufferSize);
		int localOffset = (int) (offset % maxBufferSize);
		return buffers[dbBufferIndex].getByte(localOffset);
	}
Changes the bytes at the given offset to the given values. Note, the 
original bytes can still be accessed via {@link #getOriginalBytes(long, byte[], int, int)}
If the bytes are changed more than once, only the original values are preserved.

@param offset the offset into the file bytes.
@param b a byte array with the new values to write.
@param off the offset into the byte array to get the bytes to write.
@param length the number of bytes to write.
@return the number of bytes written
@throws IndexOutOfBoundsException if invalid offset is specified
@throws IOException if the write to the database fails.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/mem/FileBytes.java