private static void setBlockAttributes(MemoryBlock block, String comment, String source,
			boolean r, boolean w, boolean x) {
		block.setComment(comment);
		block.setSourceName(source);
		block.setRead(r);
		block.setWrite(w);
		block.setExecute(x);
	}
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