private static InputBlockStream getInputBlockStream(BufferFile bufferFile, ChangeMap changeMap)
			throws IOException {
		if (changeMap == null) {
			return getInputBlockStream(bufferFile);
		}
		// This method is used so we can utilize a package method and avoid putting
		// it on the BufferFile interface
		if (bufferFile instanceof ManagedBufferFileAdapter) {
			return ((ManagedBufferFileAdapter) bufferFile).getInputBlockStream(changeMap.getData());
		}
		if (bufferFile instanceof LocalManagedBufferFile) {
			return ((LocalManagedBufferFile) bufferFile).getInputBlockStream(changeMap.getData());
		}
		throw new IllegalArgumentException(
			"Unsupported buffer file implementation: " + bufferFile.getClass().getName());
	}
Factory method for generating the appropriate type of {@link InputBlockStream}
for the specified read-only bufferFile with an optional changeMap used
to select which buffer should be transferred.  Input stream may not supply header block
in which case free list and file parameters may need to be set separately.
@param bufferFile buffer file opened read-only
@return input block stream object
@throws IOException if an I/O error occurs
Ghidra/Framework/DB/src/main/java/db/buffers/LocalBufferFile.java