private void versionBufferIfNeeded(int index) throws IOException {
		if (versionOutFile != null && versionOutFile.isPutOK(index)) {
			// Record old buffer for versioning if not empty
			DataBuffer oldBuf = new DataBuffer();
			oldBuf = get(oldBuf, index);
			if (oldBuf.data == null) {
				Msg.error(this,
					"ERROR! Unexpected condition detected in LocalBufferFile.versionBufferIfNeeded");
			}
			else {
				versionOutFile.putOldBuffer(oldBuf, index);
			}
		}
	}
Output old data for a specified buffer if required for version file.
@param index buffer index
@throws IOException
Ghidra/Framework/DB/src/main/java/db/buffers/LocalManagedBufferFile.java