protected boolean pasteBytes(Program program, byte[] bytes) {

			// note: loop one byte at a time here, since Memory will validate all addresses
			//       before pasting any bytes
			boolean foundError = false;
			Address address = currentLocation.getAddress();
			Memory memory = program.getMemory();
			for (byte element : bytes) {
				try {
					memory.setByte(address, element);
				}
				catch (MemoryAccessException e) {
					// Keep trying the remaining bytes.  Should we just stop in this case?
					foundError = true;
				}
				address = address.next();
			}
			return !foundError;
		}
Create a Transferable from the given text.

@param text text used to create a Transferable
@return a Transferable
Ghidra/Features/Base/src/main/java/ghidra/app/util/ByteCopier.java