public synchronized DataBuffer getBuffer(int id) throws IOException {

		if (corruptedState) {
			throw new IOException("Corrupted BufferMgr state");
		}

		BufferNode node = getBufferNode(id, true); // loads buffer into memory cache
		DataBuffer buf = node.buffer;
		if (node.empty || buf.isEmpty()) {
			throw new IOException("Invalid buffer: " + id);
		}

		// Buffers requested forUpdate are removed from cache
		if (node.checkpoint != currentCheckpoint || currentCheckpointHead == null) {
			unloadCachedNode(node);
		}
		removeFromCache(node);

		node.locked = true;
		++lockCount;

		return buf;
	}
Get the specified buffer.
When done working with the buffer, the method releaseBuffer
must be used to return it to the buffer manager.  Buffers
should not be held for long periods.
@param id buffer id
@return buffer object, or null if buffer not found
@throws IOException if source or cache file access error occurs
Ghidra/Framework/DB/src/main/java/db/buffers/BufferMgr.java