static void completeBlockStreamTransfer(InputBlockStream in, OutputBlockStream out,
			TaskMonitor monitor) throws CancelledException, IOException {
		int count = 0;
		try (BlockStreamCancelMonitor cancelMonitor =
			new BlockStreamCancelMonitor(monitor, in, out)) {
			int srcBlockCnt = in.getBlockCount();
			BufferFileBlock block;
			while ((block = in.readBlock()) != null) {
				monitor.checkCancelled();
				out.writeBlock(block);
				monitor.setProgress(count++);
			}
			if (count != srcBlockCnt) {
				throw new IOException("unexpected block transfer count");
			}
		}
	}
Perform a complete block stream transfer from in to out
@param in input block stream
@param out output block stream
@param monitor progress and cancel monitor
@throws CancelledException the operation is cancelled
@throws IOException if an I/O error occurs
Ghidra/Framework/DB/src/main/java/db/buffers/LocalBufferFile.java