protected boolean hasEnoughSpace(Program program, Address address, int byteCount) {
			Listing listing = program.getListing();
			for (int i = 0; i < byteCount;) {
				if (address == null) {
					status = "Not enough addresses to paste bytes";
					tool.beep();
					return false;
				}
				CodeUnit codeUnit = listing.getCodeUnitContaining(address);
				if (!(codeUnit instanceof Data data) || data.isDefined()) {
					status = "Cannot paste on top of defined instructions/data";
					tool.beep();
					return false;
				}
				int length = codeUnit.getLength();
				i += length;
				address = codeUnit.getMaxAddress().next();
			}
			return true;
		}
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