@Override
		public void writeBlock(BufferFileBlock block) throws IOException {
			if (blockSize != block.size()) {
				throw new IOException("incompatible block size");
			}
			synchronized (LocalBufferFile.this) {
				if (raf == null) {
					throw new ClosedException();
				}
				int blockIndex = block.getIndex();
				if (blockIndex == 0) {
					// must refresh buffer file if head block is written
					refreshOnClose = true;
				}
				seekBlock(blockIndex, 0);
				raf.write(block.getData());
				if (blockIndex > bufferCount) {
					// we must assume that any buffers starting with bufferCount upto blockIndex will
					// be accounted for in the ultimate free-list maintained outside the buffer file.
					// NOTE: bufferCount reflects DataBuffers which excludes the first block at blockIndex=0
					bufferCount = blockIndex; // 
				}
			}
		}
<code>LocalOutputBlockStream</code> provides an OutputBlockStream for
updating specific buffers of a non-read-only file.
Ghidra/Framework/DB/src/main/java/db/buffers/LocalBufferFile.java