@Override
	protected void loadProgramInto(ByteProvider provider, LoadSpec loadSpec,
			List<Option> options, MessageLog log, Program program, TaskMonitor monitor)
			throws CancelledException, LoadException, IOException {

		LanguageCompilerSpecPair pair = loadSpec.getLanguageCompilerSpec();
		LanguageID languageID = program.getLanguageID();
		CompilerSpecID compilerSpecID = program.getCompilerSpec().getCompilerSpecID();
		if (!(pair.languageID.equals(languageID) && pair.compilerSpecID.equals(compilerSpecID))) {
			String message = provider.getAbsolutePath() +
				" does not have the same language/compiler spec as program " + program.getName();
			log.appendMsg(message);
			throw new LoadException(message);
		}
		load(provider, loadSpec, options, program, monitor, log);
	}
Loads bytes in a particular format into the given {@link Program}.

@param provider The bytes to load.
@param loadSpec The {@link LoadSpec} to use during load.
@param options The load options.
@param program The {@link Program} to load into.
@param monitor A cancelable task monitor.
@param log The message log.
@throws IOException if there was an IO-related problem loading.
@throws CancelledException if the user cancelled the load.
Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/AbstractProgramWrapperLoader.java