for (int i = 0; i < transferData.data.length; i++) { byte[] data = transferData.data[i]; if (data == null) return OS.cantGetFlavorErr; int result = OS.SetDragItemFlavorData(theDrag, theItemRef, theType, data, data.length, 0); if (result != OS.noErr) return result; } return OS.noErr;
byte[] datum = transferData.data[0]; if (datum == null) return OS.cantGetFlavorErr; return OS.SetDragItemFlavorData(theDrag, theItemRef, theType, datum, datum.length, 0);
int dragSendDataProc(int theType, int dragSendRefCon, int theItemRef, int theDrag) {	if (theType == 0) return OS.badDragFlavorErr;	TransferData transferData = new TransferData();	transferData.type = theType;	DNDEvent event = new DNDEvent();	event.widget = this;	event.time = (int)System.currentTimeMillis(); 	event.dataType = transferData; 	notifyListeners(DND.DragSetData, event);	Transfer transfer = null;	for (int i = 0; i < transferAgents.length; i++) {		if (transferAgents[i].isSupportedType(transferData)) {			transfer = transferAgents[i];			break;		}	}	if (transfer == null) return OS.badDragFlavorErr;	transfer.javaToNative(event.data, transferData);	if (transferData.result != OS.noErr) return transferData.result;	for (int i = 0; i < transferData.data.length; i++) {		byte[] data = transferData.data[i];		if (data == null) return OS.cantGetFlavorErr;		int result = OS.SetDragItemFlavorData(theDrag, theItemRef, theType, data, data.length, 0);		if (result != OS.noErr) return result;	}	return OS.noErr;}