private void preCacheSourceFile() {
		try {
			if (!(sourceFile instanceof BufferFileAdapter)) {
				throw new UnsupportedOperationException("unsupported use of preCacheSourceFile");
			}
			Msg.trace(BufferMgr.this, "Pre-cache started...");
			int cacheCount = 0;
			BufferFileAdapter sourceAdapter = (BufferFileAdapter) sourceFile;
			try (InputBlockStream inputBlockStream = sourceAdapter.getInputBlockStream()) {
				BufferFileBlock block;
				while (!Thread.interrupted() && (block = inputBlockStream.readBlock()) != null) {
					DataBuffer buf = LocalBufferFile.getDataBuffer(block);
					if (buf != null && !buf.isEmpty() && preCacheBuffer(buf)) { // skip head block and empty blocks
						++cacheCount;
					}
				}
				Msg.trace(BufferMgr.this, "Pre-cache added " + cacheCount + " of " +
					sourceFile.getIndexCount() + " buffers to cache");
			}
		}
		catch (InterruptedIOException e) {
			// ignore
		}
		catch (IOException e) {
			Msg.error(BufferMgr.this, "pre-cache failure: " + e.getMessage(), e);
		}
		finally {
			synchronized (preCacheLock) {
				preCacheStatus = PreCacheStatus.STOPPED;
				preCacheThread = null;
				preCacheLock.notifyAll();
			}
		}
	}
Pre-cache source file into cache file.  This is intended to be run in a
dedicated thread when the source file is remote.
Ghidra/Framework/DB/src/main/java/db/buffers/BufferMgr.java