private void createIndex(DataBuffer indexBuffer) throws IOException {

		try {
			indexBuffer.putByte(NODE_TYPE_OFFSET, NodeMgr.CHAINED_BUFFER_INDEX_NODE);
			indexBuffer.putInt(DATA_LENGTH_OFFSET, getObfuscationDataLengthFieldValue());
			indexBuffer.putInt(NEXT_INDEX_ID_OFFSET, -1);

			int indexCount = allocateIndex(indexBuffer);
			Arrays.fill(dataBufferIdTable, -1);
			int indexBufferCount = ((indexCount - 1) / indexesPerBuffer) + 1;
			indexBufferIdTable = new int[indexBufferCount];

			byte[] emptyIndexData = new byte[indexesPerBuffer * ID_SIZE];
			Arrays.fill(emptyIndexData, (byte) 0xff);

			indexBufferIdTable[0] = indexBuffer.getId();
			indexBuffer.put(INDEX_BASE_OFFSET, emptyIndexData);
			for (int i = 1; i < indexBufferCount; i++) {
				indexBuffer = appendIndexBuffer(indexBuffer);
				indexBufferIdTable[i] = indexBuffer.getId();
				indexBuffer.put(INDEX_BASE_OFFSET, emptyIndexData);
			}
		}
		finally {
			bufferMgr.releaseBuffer(indexBuffer);
		}
	}
Create and initialize a new index for this DBBuffer.
The entire index is allocated within the database (i.e., Index Nodes).  
Data Nodes are only allocated as needed when data is written.
@param indexBuffer first index buffer.  This buffer will be released
prior to returning.
@throws IOException thrown if IO error occurs
Ghidra/Framework/DB/src/main/java/db/ChainedBuffer.java