OS.CFRelease(url);
OS.CFRelease(path);
public Object nativeToJava(TransferData transferData) {	if (!isSupportedType(transferData) || transferData.data == null) return null;	if (transferData.data.length == 0) return null;		if (transferData.type == URILISTID) {		byte[] data = transferData.data[0];		if (data.length == 0) return null;		char[] chars = new char[(data.length + 1) / 2];		OS.memcpy(chars, data, data.length);		String str = new String(chars);		int start = str.indexOf(URILIST_PREFIX);		if (start == -1) return null;		start += URILIST_PREFIX.length();		String[] fileNames = new String[0];		while (start < str.length()) { 			int end = str.indexOf(URILIST_SEPARATOR, start);			if (end == -1) end = str.length() - 1;			String fileName = str.substring(start, end);			String[] newFileNames = new String[fileNames.length + 1];			System.arraycopy(fileNames, 0, newFileNames, 0, fileNames.length);			newFileNames[fileNames.length] = fileName;			fileNames = newFileNames;			start = str.indexOf(URILIST_PREFIX, end);			if (start == -1) break;			start += URILIST_PREFIX.length();		}		return fileNames;	}	if (transferData.type == HFSID) {		int count = transferData.data.length;		String[] fileNames = new String[count];		for (int i=0; i<count; i++) {			byte[] data = transferData.data[i];			byte[] fsspec = new byte[data.length - 10];			System.arraycopy(data, 10, fsspec, 0, fsspec.length);			byte[] fsRef = new byte[80];			if (OS.FSpMakeFSRef(fsspec, fsRef) != OS.noErr) return null;			int url = OS.CFURLCreateFromFSRef(OS.kCFAllocatorDefault, fsRef);			if (url == 0) return null;			try {				int path = OS.CFURLCopyFileSystemPath(url, OS.kCFURLPOSIXPathStyle);				if (path == 0) return null;				try {					int length = OS.CFStringGetLength(path);					if (length == 0) return null;					char[] buffer= new char[length];					CFRange range = new CFRange();					range.length = length;					OS.CFStringGetCharacters(path, range, buffer);					fileNames[i] = new String(buffer);				} finally {					OS.CFRelease(path);				}			} finally {				OS.CFRelease(url);			}		}		return fileNames;	}	return null;}