private void readFreeIndexList() throws NoSuchElementException, IOException {

		freeListIndex = recoveryFile.getParameter(FREE_LIST_BUFFER_INDEX_PARM);

		int size = recoveryFile.getParameter(FREE_LIST_SIZE_PARM);
		freeIndexes = new int[size];

		int maxOffset = (recoveryFile.getBufferSize() - 4) & ~0x03;

		int thisIndex = freeListIndex;
		DataBuffer listBuffer = new DataBuffer();
		recoveryFile.get(listBuffer, thisIndex);
		if (listBuffer.isEmpty()) {
			throw new IOException(BAD_FREE_LIST);
		}
		int offset = FIRST_ENTRY_OFFSET;
		int entryIx = 0;

		while (true) {
			if (offset > maxOffset) {
				// Get next list buffer
				thisIndex = listBuffer.getInt(NEXT_BUFFER_INDEX_OFFSET);
				recoveryFile.get(listBuffer, thisIndex);
				if (listBuffer.isEmpty()) {
					throw new IOException(BAD_FREE_LIST);
				}
				offset = FIRST_ENTRY_OFFSET;
			}

			// Read entry - end of list signified by -1
			int origIndex = listBuffer.getInt(offset);
			if (origIndex < 0) {
				break;
			}
			if (entryIx == size) {
				throw new IOException(BAD_FREE_LIST);
			}
			offset += 4;
			freeIndexes[entryIx++] = origIndex;
		}
		if (entryIx != size) {
			throw new IOException(BAD_FREE_LIST);
		}
		Arrays.sort(freeIndexes);
	}
Construct a read-only recovery file
@param srcBf the original source buffer file to which this file applies.
@param rfile version buffer file to be updated/created
@throws IOException if the file already exists or an IO error occurs
Ghidra/Framework/DB/src/main/java/db/buffers/RecoveryFile.java