public static FileBytes createFileBytes(Program program, ByteProvider provider, long offset,
			long length, TaskMonitor monitor) throws IOException, CancelledException {
		Memory memory = program.getMemory();
		try (InputStream fis = provider.getInputStream(offset)) {
			return memory.createFileBytes(provider.getName(), offset, length, fis, monitor);
		}
	}
Creates a new {@link FileBytes} object using a portion of the bytes from a {@link ByteProvider}
@param program the program in which to create a new FileBytes object
@param provider the ByteProvider from which to get the bytes.
@param offset the offset into the ByteProvider from which to start loading bytes.
@param length the number of bytes to load
@param monitor the monitor for canceling this potentially long running operation.
@return the newly created FileBytes object.
@throws IOException if an IOException occurred.
@throws CancelledException if the user cancelled the operation
Ghidra/Features/Base/src/main/java/ghidra/app/util/MemoryBlockUtils.java